From ce93c2fc62fbcb29611d6e6ce8fd6db3611fdae1 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 4 Jul 2012 14:40:02 +1000 Subject: [PATCH] Use cgpu-> not gpus[] in watchdog thread. --- cgminer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgminer.c b/cgminer.c index 19d34e6a..77b14b0a 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);