From e986c04c6895c0f64074cba0439f5716ba9e8c14 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 9 Feb 2015 17:38:01 +1100 Subject: [PATCH] Fix non proxy mode breakage --- src/stratifier.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index a984a155..c0a59bba 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2026,13 +2026,14 @@ static bool new_enonce1(sdata_t *sdata, stratum_instance_t *client) int enonce1varlen, i; bool ret = false; - if (!sdata->proxy) - return false; - - mutex_lock(&sdata->proxy_lock); - client->proxyid = sdata->proxy->id; - client->subproxyid = sdata->proxy->subid; - mutex_unlock(&sdata->proxy_lock); + if (client->ckp->proxy) { + if (!sdata->proxy) + return false; + mutex_lock(&sdata->proxy_lock); + client->proxyid = sdata->proxy->id; + client->subproxyid = sdata->proxy->subid; + mutex_unlock(&sdata->proxy_lock); + } /* Extract the enonce1varlen from the current workbase which may be * a different workbase to when we __fill_enonce1data but the value