mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-11 13:11:02 +00:00
Revert "Parse reject reason from the stratum json error code if there is one."
This reverts commit c6a3d065fa6c19191af3709fc5b138faf0c0fafb. Segfaults. Needs work.
This commit is contained in:
parent
3d982dfbe9
commit
310239b8e8
12
cgminer.c
12
cgminer.c
@ -1885,18 +1885,6 @@ share_result(json_t *val, json_t *res, const struct work *work, char *hashshow,
|
|||||||
reason[reasonLen + 2] = ')'; reason[reasonLen + 3] = '\0';
|
reason[reasonLen + 2] = ')'; reason[reasonLen + 3] = '\0';
|
||||||
memcpy(disposition + 7, reasontmp, reasonLen);
|
memcpy(disposition + 7, reasontmp, reasonLen);
|
||||||
disposition[6] = ':'; disposition[reasonLen + 7] = '\0';
|
disposition[6] = ':'; disposition[reasonLen + 7] = '\0';
|
||||||
} else if (work->stratum) {
|
|
||||||
json_t *arr_val = json_object_get(val, "error");
|
|
||||||
|
|
||||||
if (likely(json_is_array(arr_val))) {
|
|
||||||
char *json_reason = (char *)json_string_value(json_array_get(arr_val, 1));
|
|
||||||
|
|
||||||
if (likely(json_reason)) {
|
|
||||||
snprintf(reason, 31, "%s", json_reason);
|
|
||||||
free(json_reason);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else
|
} else
|
||||||
strcpy(reason, "");
|
strcpy(reason, "");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user