Overhaul the daemon uptime functions.
[paraslash.git] / audiod_command.c
index 0f7aa7e625ffcd0c7274f16e184f308b0322ceab..dfb014aebc1c1d12659364189ac79813c952139c 100644 (file)
@@ -194,7 +194,7 @@ static int get_play_time_slot_num(void)
        FOR_EACH_SLOT(i) {
                struct slot_info *s = &slot[i];
                struct timeval wstime;
-               if (!s->wns)
+               if (!s->wns || !s->wns[0].btrn)
                        continue;
                btr_get_node_start(s->wns[0].btrn, &wstime);
                if (oldest_slot >= 0 && tv_diff(&wstime, &oldest_wstime, NULL) > 0)
@@ -480,7 +480,7 @@ void audiod_status_dump(void)
                        free(new);
        }
 
-       new = uptime_str();
+       new = get_server_uptime_str(now);
        old = stat_item_values[SI_AUDIOD_UPTIME];
        if (!old || strcmp(old, new)) {
                free(old);