From 1c5c8df6ff466b40e9ec7afc17146f422a2d3bff Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 19 May 2013 18:36:02 +1000 Subject: [PATCH] Check for restart before buffering more reads in Icarus. --- driver-icarus.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/driver-icarus.c b/driver-icarus.c index 1c5881bd..c9dc041f 100644 --- a/driver-icarus.c +++ b/driver-icarus.c @@ -358,13 +358,6 @@ static int icarus_get_nonce(struct cgpu_info *icarus, unsigned char *buf, struct return ICA_NONCE_TIMEOUT; } - if (amt > 0) { - buf += amt; - read_amount -= amt; - first = false; - continue; - } - if (thr && thr->work_restart) { if (opt_debug) { applog(LOG_DEBUG, @@ -372,6 +365,12 @@ static int icarus_get_nonce(struct cgpu_info *icarus, unsigned char *buf, struct } return ICA_NONCE_RESTART; } + + if (amt > 0) { + buf += amt; + read_amount -= amt; + first = false; + } } }