From 3cf9fd186ea6c7650a6a478895921754bb6c3724 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 14 Sep 2014 00:08:13 +1000 Subject: [PATCH] Revert "Maintain only one unlock position in parse_submit" This reverts commit 8fab45147dcc0d2dd4a1c10877b2e6487a6b915f. --- src/stratifier.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index b650d964..c3e07a68 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1913,7 +1913,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); - goto out_unlock; + ck_runlock(&workbase_lock); + goto out; } share = true; wdiff = wb->diff; @@ -1949,9 +1950,6 @@ static json_t *parse_submit(stratum_instance_t *client, json_t *json_msg, out_unlock: ck_runlock(&workbase_lock); - if (unlikely(!share)) - goto out; - if (submit) submit_share(client, id, nonce2, ntime, nonce, json_integer_value(json_object_get(json_msg, "id")));