Browse Source

Yet more logic fail correction.

Con Kolivas 15 years ago
parent
commit
8edc99e473
1 changed files with 3 additions and 4 deletions
  1. 3 4
      main.c

+ 3 - 4
main.c

@@ -764,8 +764,7 @@ static void inc_staged(int inc, bool lp)
 	pthread_mutex_lock(&stgd_lock);
 	pthread_mutex_lock(&stgd_lock);
 	if (lp)
 	if (lp)
 		lp_staged += inc;
 		lp_staged += inc;
-	else
-		total_staged += inc;
+	total_staged += inc;
 	pthread_mutex_unlock(&stgd_lock);
 	pthread_mutex_unlock(&stgd_lock);
 }
 }
 
 
@@ -783,7 +782,7 @@ static int requests_staged(void)
 	int ret;
 	int ret;
 
 
 	pthread_mutex_lock(&stgd_lock);
 	pthread_mutex_lock(&stgd_lock);
-	ret = total_staged + lp_staged;
+	ret = total_staged;
 	pthread_mutex_unlock(&stgd_lock);
 	pthread_mutex_unlock(&stgd_lock);
 	return ret;
 	return ret;
 }
 }
@@ -1775,8 +1774,8 @@ int main (int argc, char *argv[])
 			applog(LOG_ERR, "Failed to queue_request in main");
 			applog(LOG_ERR, "Failed to queue_request in main");
 			return 1;
 			return 1;
 		}
 		}
-		inc_staged(1, true);
 	}
 	}
+	lp_staged = opt_n_threads + gpu_threads + opt_queue;
 
 
 #ifdef HAVE_OPENCL
 #ifdef HAVE_OPENCL
 	/* start GPU mining threads */
 	/* start GPU mining threads */