Browse Source

Bugfix: erupter: After identify, skip starting work if next scanhash is already decided to be a "first run" (eg, device errors)

Luke Dashjr 12 years ago
parent
commit
bf625109b3
1 changed files with 6 additions and 3 deletions
  1. 6 3
      driver-icarus.c

+ 6 - 3
driver-icarus.c

@@ -855,10 +855,13 @@ void handle_identify(struct thr_info * const thr, int ret, const bool was_first_
 	}
 	
 	// 4. Start next job
-	applog(LOG_DEBUG, "%"PRIpreprv": Identify: Starting next job", icarus->proc_repr);
-	if (!icarus_job_start(thr))
+	if (!state->firstrun)
+	{
+		applog(LOG_DEBUG, "%"PRIpreprv": Identify: Starting next job", icarus->proc_repr);
+		if (!icarus_job_start(thr))
 no_job_start:
-		state->firstrun = true;
+			state->firstrun = true;
+	}
 	
 	state->identify = false;
 }