mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
fix empty cookies
This commit is contained in:
parent
56df00634f
commit
9a091921f1
1 changed files with 9 additions and 6 deletions
|
@ -78,6 +78,8 @@ send_json_stats(struct evhttp_request *req, void *arg)
|
||||||
|
|
||||||
hdrs_in = evhttp_request_get_input_headers(req);
|
hdrs_in = evhttp_request_get_input_headers(req);
|
||||||
const char *cookies = evhttp_find_header(hdrs_in, "Cookie");
|
const char *cookies = evhttp_find_header(hdrs_in, "Cookie");
|
||||||
|
if (cookies)
|
||||||
|
{
|
||||||
char *wa = strstr(cookies, "wa=");
|
char *wa = strstr(cookies, "wa=");
|
||||||
if (wa)
|
if (wa)
|
||||||
{
|
{
|
||||||
|
@ -86,6 +88,7 @@ send_json_stats(struct evhttp_request *req, void *arg)
|
||||||
uint64_t balance = miner_balance(wa);
|
uint64_t balance = miner_balance(wa);
|
||||||
mb = (double) balance / 1000000000000.0;
|
mb = (double) balance / 1000000000000.0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
evbuffer_add_printf(buf, "{"
|
evbuffer_add_printf(buf, "{"
|
||||||
"\"pool_hashrate\":%"PRIu64","
|
"\"pool_hashrate\":%"PRIu64","
|
||||||
|
|
Loading…
Reference in a new issue