From b803c285e1f9f265dea77875c45562045704a096 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 14 Sep 2014 00:08:24 +1000 Subject: [PATCH] Revert "No valid workinfo should be a share error not a share" This reverts commit 92a884f12ac081630bc6efa2cb9089e4240f39c7. --- src/stratifier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index c3e07a68..bda81e22 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1906,6 +1906,8 @@ static json_t *parse_submit(stratum_instance_t *client, json_t *json_msg, sscanf(job_id, "%lx", &id); sscanf(ntime, "%x", &ntime32); + share = true; + ck_rlock(&workbase_lock); HASH_FIND_I64(workbases, &id, wb); if (unlikely(!wb)) { @@ -1913,10 +1915,8 @@ static json_t *parse_submit(stratum_instance_t *client, json_t *json_msg, json_set_string(json_msg, "reject-reason", SHARE_ERR(err)); strcpy(idstring, job_id); ASPRINTF(&fname, "%s.sharelog", current_workbase->logdir); - ck_runlock(&workbase_lock); - goto out; + goto out_unlock; } - share = true; wdiff = wb->diff; strcpy(idstring, wb->idstring); ASPRINTF(&fname, "%s.sharelog", wb->logdir);