Browse Source

Merge commit '450ed2a' into bfgminer

Luke Dashjr 12 years ago
parent
commit
1b4827b7c3
1 changed files with 4 additions and 3 deletions
  1. 4 3
      driver-bitforce.c

+ 4 - 3
driver-bitforce.c

@@ -98,16 +98,17 @@ static ssize_t bitforce_send(int fd, int procid, const void *buf, ssize_t bufLen
 	ssize_t rv;
 	memcpy(&realbuf[3], buf, bufLen);
 	realbuf[0] = '@';
-	realbuf[1] = procid;
-	realbuf[2] = bufLen;
+	realbuf[1] = bufLen;
+	realbuf[2] = procid;
 	bufp = realbuf;
-	while (true)
+	do
 	{
 		rv = BFwrite(fd, bufp, bufLeft);
 		if (rv <= 0)
 			return rv;
 		bufLeft -= rv;
 	}
+	while (bufLeft > 0);
 	return bufLen;
 }