Browse Source

Merge branch 'cg_merges_20121203' into bfgminer

Luke Dashjr 13 years ago
parent
commit
17b1ecab35
2 changed files with 9 additions and 0 deletions
  1. 8 0
      miner.c
  2. 1 0
      usbutils.c

+ 8 - 0
miner.c

@@ -5478,10 +5478,18 @@ static bool cnx_needed(struct pool *pool)
 {
 {
 	struct pool *cp;
 	struct pool *cp;
 
 
+	/* Balance strategies need all pools online */
 	if (pool_strategy == POOL_BALANCE)
 	if (pool_strategy == POOL_BALANCE)
 		return true;
 		return true;
 	if (pool_strategy == POOL_LOADBALANCE)
 	if (pool_strategy == POOL_LOADBALANCE)
 		return true;
 		return true;
+
+	/* Idle pool needs something to kick it alive again */
+	if (pool->idle)
+		return true;
+
+	/* Getwork pools without opt_fail_only need backup pools up to be able
+	 * to leak shares */
 	cp = current_pool();
 	cp = current_pool();
 	if (cp == pool)
 	if (cp == pool)
 		return true;
 		return true;

+ 1 - 0
usbutils.c

@@ -1133,6 +1133,7 @@ int _usb_read(struct cgpu_info *cgpu, int ep, char *buf, size_t bufsiz, int *pro
 	}
 	}
 
 
 	tot = 0;
 	tot = 0;
+	err = LIBUSB_SUCCESS;
 	while (bufsiz) {
 	while (bufsiz) {
 		got = 0;
 		got = 0;
 		STATS_TIMEVAL(&tv_start);
 		STATS_TIMEVAL(&tv_start);