Remove inprocess line instead of deleting all following responses in bflsc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/driver-bflsc.c b/driver-bflsc.c
index e0d556b..ea59ddd 100644
--- a/driver-bflsc.c
+++ b/driver-bflsc.c
@@ -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);