1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

Remove inprocess line instead of deleting all following responses in bflsc.

This commit is contained in:
Con Kolivas 2013-08-30 20:29:00 +10:00
parent 9a86702955
commit 0f712d5191

View File

@ -108,10 +108,15 @@ static bool tolines(struct cgpu_info *bflsc, int dev, char *buf, int *lines, cha
ok = true;
while (tok) {
p_items = realloc(p_items, ++p_lines * sizeof(*p_items));
if (unlikely(!p_items))
quit(1, "Failed to realloc p_items in tolines");
p_items[p_lines-1] = strdup(tok);
if (strncasecmp(tok, BFLSC_INPROCESS, BFLSC_INPROCESS_LEN)) {
p_items = realloc(p_items, ++p_lines * sizeof(*p_items));
if (unlikely(!p_items))
quit(1, "Failed to realloc p_items in tolines");
p_items[p_lines-1] = strdup(tok);
} else {
applog(LOG_WARNING, "%s%i: in process response (%s) ignored",
bflsc->drv->name, bflsc->device_id, tok);
}
tok = strtok(NULL, "\n");
}
@ -1311,13 +1316,6 @@ static int process_results(struct cgpu_info *bflsc, int dev, char *buf, int *non
xlinkstr(xlink, sizeof(xlink), dev, sc_info);
if (!strncasecmp(buf, BFLSC_INPROCESS, BFLSC_INPROCESS_LEN)) {
tmp = str_text(buf);
applog(LOG_WARNING, "%s%i:%s in process response (%s) ignored",
bflsc->drv->name, bflsc->device_id, xlink, tmp);
free(tmp);
goto arigatou;
}
res = tolines(bflsc, dev, buf, &lines, &items, C_GETRESULTS);
if (!res || lines < 1) {
tmp = str_text(buf);