From 1199419fa1c4ebf880edd438b9efba95dc1f256d Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 20 Jun 2014 02:07:05 +1000 Subject: [PATCH] ckdb - add 1hr user stats to homepage --- src/ckdb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ckdb.c b/src/ckdb.c index 3ea604ea..376988df 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -4034,8 +4034,12 @@ static char *cmd_homepage(char *cmd, char *id, __maybe_unused tv_t *now, __maybe double_to_buf(DATA_USERSTATS(us_item)->hashrate5m, reply, sizeof(reply)); snprintf(tmp, sizeof(tmp), "u_hashrate5m=%s%c", reply, FLDSEP); APPEND_REALLOC(buf, off, len, tmp); + + double_to_buf(DATA_USERSTATS(us_item)->hashrate1hr, reply, sizeof(reply)); + snprintf(tmp, sizeof(tmp), "u_hashrate1hr=%s", reply); + APPEND_REALLOC(buf, off, len, tmp); } else { - snprintf(tmp, sizeof(tmp), "u_hashrate5m=?%c", FLDSEP); + snprintf(tmp, sizeof(tmp), "u_hashrate5m=?%cu_hashrate1hr=?", FLDSEP); APPEND_REALLOC(buf, off, len, tmp); }