Browse Source

Logic fail on queueing multiple requests at once. Just queue one at a time.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
17ba2dca63
  1. 13
      cgminer.c

13
cgminer.c

@ -3550,7 +3550,7 @@ static bool queue_request(struct thr_info *thr, bool needed) @@ -3550,7 +3550,7 @@ static bool queue_request(struct thr_info *thr, bool needed)
struct workio_cmd *wc;
struct timeval now;
time_t scan_post;
int toq, rq, rs;
int rq, rs;
bool ret = true;
/* Prevent multiple requests being executed at once */
@ -3577,12 +3577,6 @@ static bool queue_request(struct thr_info *thr, bool needed) @@ -3577,12 +3577,6 @@ static bool queue_request(struct thr_info *thr, bool needed)
requested_tv_sec = now.tv_sec;
if (rq > rs)
toq = rq - mining_threads;
else
toq = rs - mining_threads;
do {
inc_queued();
/* fill out work request message */
@ -3590,7 +3584,7 @@ static bool queue_request(struct thr_info *thr, bool needed) @@ -3590,7 +3584,7 @@ static bool queue_request(struct thr_info *thr, bool needed)
if (unlikely(!wc)) {
applog(LOG_ERR, "Failed to calloc wc in queue_request");
ret = false;
break;
goto out;
}
wc->cmd = WC_GET_WORK;
@ -3609,11 +3603,8 @@ static bool queue_request(struct thr_info *thr, bool needed) @@ -3609,11 +3603,8 @@ static bool queue_request(struct thr_info *thr, bool needed)
applog(LOG_ERR, "Failed to tq_push in queue_request");
workio_cmd_free(wc);
ret = false;
break;
}
} while (--toq > 0);
out:
control_tclear(&queueing);

Loading…
Cancel
Save