Browse Source

Revert "Merge commit '4ba6cba' into cg_merges_20130602"

This reverts commit d70c1881452105930dc599291b92b6622414e7b7, reversing
changes made to 2cc7b9e1be99899606f286d007e8e39002f3b02d.
Luke Dashjr 12 years ago
parent
commit
e4db66d38b
1 changed files with 7 additions and 7 deletions
  1. 7 7
      driver-icarus.c

+ 7 - 7
driver-icarus.c

@@ -250,6 +250,13 @@ int icarus_gets(unsigned char *buf, int fd, struct timeval *tv_finish, struct th
 			return ICA_GETS_OK;
 		}
 
+		if (ret > 0) {
+			buf += ret;
+			read_amount -= ret;
+			first = false;
+			continue;
+		}
+			
 		if (thr && thr->work_restart) {
 			if (epollfd != -1)
 				close(epollfd);
@@ -271,13 +278,6 @@ int icarus_gets(unsigned char *buf, int fd, struct timeval *tv_finish, struct th
 			}
 			return ICA_GETS_TIMEOUT;
 		}
-		
-		if (ret > 0) {
-			buf += ret;
-			read_amount -= ret;
-			first = false;
-			continue;
-		}
 	}
 }