|
|
@ -8184,9 +8184,12 @@ static void *statsupdate(void *arg) |
|
|
|
"shares", worker->shares, |
|
|
|
"shares", worker->shares, |
|
|
|
"bestshare", worker->best_diff); |
|
|
|
"bestshare", worker->best_diff); |
|
|
|
|
|
|
|
|
|
|
|
ASPRINTF(&fname, "%s/workers/%s", ckp->logdir, worker->workername); |
|
|
|
/* Only log workers of authorised users */ |
|
|
|
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER | JSON_EOL); |
|
|
|
if (user->authorised) { |
|
|
|
add_log_entry(&log_entries, &fname, &s); |
|
|
|
ASPRINTF(&fname, "%s/workers/%s", ckp->logdir, worker->workername); |
|
|
|
|
|
|
|
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER | JSON_EOL); |
|
|
|
|
|
|
|
add_log_entry(&log_entries, &fname, &s); |
|
|
|
|
|
|
|
} |
|
|
|
json_decref(val); |
|
|
|
json_decref(val); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -8234,14 +8237,16 @@ static void *statsupdate(void *arg) |
|
|
|
remote_users++; |
|
|
|
remote_users++; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ASPRINTF(&fname, "%s/users/%s", ckp->logdir, user->username); |
|
|
|
if (user->authorised) { |
|
|
|
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER | JSON_EOL); |
|
|
|
ASPRINTF(&fname, "%s/users/%s", ckp->logdir, user->username); |
|
|
|
add_log_entry(&log_entries, &fname, &s); |
|
|
|
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER | JSON_EOL); |
|
|
|
if (!idle) { |
|
|
|
add_log_entry(&log_entries, &fname, &s); |
|
|
|
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER); |
|
|
|
if (!idle) { |
|
|
|
ASPRINTF(&sp, "User %s:%s", user->username, s); |
|
|
|
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER); |
|
|
|
dealloc(s); |
|
|
|
ASPRINTF(&sp, "User %s:%s", user->username, s); |
|
|
|
add_msg_entry(&char_list, &sp); |
|
|
|
dealloc(s); |
|
|
|
|
|
|
|
add_msg_entry(&char_list, &sp); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
json_decref(val); |
|
|
|
json_decref(val); |
|
|
|
if (ckp->remote) |
|
|
|
if (ckp->remote) |
|
|
|