Browse Source

Show which pool untracked share messages have come from.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
75d0a45a10
  1. 8
      cgminer.c

8
cgminer.c

@ -4547,7 +4547,7 @@ static void stratum_share_result(json_t *val, json_t *res_val, json_t *err_val,
/* Parses stratum json responses and tries to find the id that the request /* Parses stratum json responses and tries to find the id that the request
* matched to and treat it accordingly. */ * matched to and treat it accordingly. */
static bool parse_stratum_response(char *s) static bool parse_stratum_response(struct pool *pool, char *s)
{ {
json_t *val = NULL, *err_val, *res_val, *id_val; json_t *val = NULL, *err_val, *res_val, *id_val;
struct stratum_share *sshare; struct stratum_share *sshare;
@ -4588,9 +4588,9 @@ static bool parse_stratum_response(char *s)
mutex_unlock(&sshare_lock); mutex_unlock(&sshare_lock);
if (!sshare) { if (!sshare) {
if (json_is_true(res_val)) if (json_is_true(res_val))
applog(LOG_NOTICE, "Accepted untracked stratum share"); applog(LOG_NOTICE, "Accepted untracked stratum share from pool %d", pool->pool_no);
else else
applog(LOG_NOTICE, "Rejected untracked stratum share"); applog(LOG_NOTICE, "Rejected untracked stratum share from pool %d", pool->pool_no);
goto out; goto out;
} }
stratum_share_result(val, res_val, err_val, sshare); stratum_share_result(val, res_val, err_val, sshare);
@ -4684,7 +4684,7 @@ static void *stratum_thread(void *userdata)
continue; continue;
} }
if (!parse_method(pool, s) && !parse_stratum_response(s)) if (!parse_method(pool, s) && !parse_stratum_response(pool, s))
applog(LOG_INFO, "Unknown stratum msg: %s", s); applog(LOG_INFO, "Unknown stratum msg: %s", s);
free(s); free(s);
if (pool->swork.clean) { if (pool->swork.clean) {

Loading…
Cancel
Save