From b93e7d9daaafeb5171934a6209a4c2c65df6f5c4 Mon Sep 17 00:00:00 2001 From: XMRig Date: Wed, 3 Oct 2018 00:41:14 +0300 Subject: [PATCH] Workaround for xmrig-proxy bug. --- stratum.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stratum.c b/stratum.c index 4e937251..94650ec7 100644 --- a/stratum.c +++ b/stratum.c @@ -625,6 +625,11 @@ static bool login_decode(struct stratum_ctx *sctx, const json_t *val) { memcpy(&sctx->id, id, strlen(id)); const char *s = json_string_value(json_object_get(res, "status")); + if (!s) { + // Workaround for xmrig-proxy bug https://github.com/xmrig/xmrig-proxy/commit/dfa1960fe3eeb13f80717b7dbfcc7c6e9f222d89 + s = json_string_value(json_object_get(val, "status")); + } + if (!s) { applog(LOG_ERR, "JSON invalid status"); return false;