From 280486a74869c80a98187ffe903c23381c7aff12 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 29 Oct 2012 07:14:29 +0000 Subject: [PATCH] Bugfix: Initialize temporary stratum work Without this, work.mandatory might have been true skipping block change handling code This caused newfound shares to be considered stale always, and bitforce devices to constantly restart work --- cgminer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cgminer.c b/cgminer.c index af8c63ac..6edc5f4a 100644 --- a/cgminer.c +++ b/cgminer.c @@ -4150,6 +4150,7 @@ static void *stratum_thread(void *userdata) free(s); if (pool->swork.clean) { struct work work; + memset(&work, 0, sizeof(work)); /* Generate a single work item to update the current * block database */