Browse Source

Don't generate share error json in standalone mode since it won't be used

master
ckolivas 9 years ago
parent
commit
7aab982dc4
  1. 29
      src/stratifier.c

29
src/stratifier.c

@ -5331,21 +5331,22 @@ out:
} }
if (!share) { if (!share) {
val = json_object(); if (!CKP_STANDALONE(ckp)) {
json_set_int(val, "clientid", client->id); val = json_object();
if (!CKP_STANDALONE(ckp)) json_set_int(val, "clientid", client->id);
json_set_string(val, "secondaryuserid", user->secondaryuserid); json_set_string(val, "secondaryuserid", user->secondaryuserid);
json_set_string(val, "enonce1", client->enonce1); json_set_string(val, "enonce1", client->enonce1);
json_set_int(val, "workinfoid", sdata->current_workbase->id); json_set_int(val, "workinfoid", sdata->current_workbase->id);
json_set_string(val, "workername", client->workername); json_set_string(val, "workername", client->workername);
json_set_string(val, "username", user->username); json_set_string(val, "username", user->username);
json_object_set(val, "error", *err_val); json_object_set(val, "error", *err_val);
json_set_int(val, "errn", err); json_set_int(val, "errn", err);
json_set_string(val, "createdate", cdfield); json_set_string(val, "createdate", cdfield);
json_set_string(val, "createby", "code"); json_set_string(val, "createby", "code");
json_set_string(val, "createcode", __func__); json_set_string(val, "createcode", __func__);
json_set_string(val, "createinet", ckp->serverurl[client->server]); json_set_string(val, "createinet", ckp->serverurl[client->server]);
ckdbq_add(ckp, ID_SHAREERR, val); ckdbq_add(ckp, ID_SHAREERR, val);
}
LOGINFO("Invalid share from client %"PRId64": %s", client->id, client->workername); LOGINFO("Invalid share from client %"PRId64": %s", client->id, client->workername);
} }
free(fname); free(fname);

Loading…
Cancel
Save