aboutsummaryrefslogtreecommitdiff
path: root/src/or/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/status.c')
-rw-r--r--src/or/status.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/or/status.c b/src/or/status.c
index 3a51c8b0a..acb8ba414 100644
--- a/src/or/status.c
+++ b/src/or/status.c
@@ -39,13 +39,15 @@ secs_to_uptime(long secs)
switch (days) {
case 0:
- tor_asprintf(&uptime_string, "%d:%02d", hours, minutes);
+ tor_asprintf(&uptime_string, "%d:%02d hours", hours, minutes);
break;
case 1:
- tor_asprintf(&uptime_string, "%ld day %d:%02d", days, hours, minutes);
+ tor_asprintf(&uptime_string, "%ld day %d:%02d hours",
+ days, hours, minutes);
break;
default:
- tor_asprintf(&uptime_string, "%ld days %d:%02d", days, hours, minutes);
+ tor_asprintf(&uptime_string, "%ld days %d:%02d hours",
+ days, hours, minutes);
break;
}
@@ -82,18 +84,16 @@ log_heartbeat(time_t now)
char *bw_rcvd = NULL;
char *uptime = NULL;
const routerinfo_t *me;
- const node_t *myself;
- or_options_t *options = get_options();
- int is_server = server_mode(options);
+ const or_options_t *options = get_options();
(void)now;
- if (is_server) {
+ if (public_server_mode(options)) {
/* Let's check if we are in the current cached consensus. */
if (!(me = router_get_my_routerinfo()))
return -1; /* Something stinks, we won't even attempt this. */
else
- if (!(myself = node_get_by_id(me->cache_info.identity_digest)))
+ if (!node_get_by_id(me->cache_info.identity_digest))
log_fn(LOG_NOTICE, LD_HEARTBEAT, "Heartbeat: It seems like we are not "
"in the cached consensus.");
}