Commit ce93c2fc62fbcb29611d6e6ce8fd6db3611fdae1

Con Kolivas 2012-07-04T14:40:02

Use cgpu-> not gpus[] in watchdog thread.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index 19d34e6..77b14b0 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4577,7 +4577,7 @@ static void *watchdog_thread(void __maybe_unused *userdata)
 			dev_count_sick = (cgpu->low_count > WATCHDOG_SICK_COUNT);
 			dev_count_dead = (cgpu->low_count > WATCHDOG_DEAD_COUNT);
 
-			if (gpus[gpu].status != LIFE_WELL && (now.tv_sec - thr->last.tv_sec < WATCHDOG_SICK_TIME) && dev_count_well) {
+			if (cgpu->status != LIFE_WELL && (now.tv_sec - thr->last.tv_sec < WATCHDOG_SICK_TIME) && dev_count_well) {
 				applog(LOG_ERR, "%s: Recovered, declaring WELL!", dev_str);
 				cgpu->status = LIFE_WELL;
 				cgpu->device_last_well = time(NULL);