X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod_command.c;h=a225b76b83f848c5f9ec31b8a141a64d932212ee;hp=ea8c1a582f3301e08ca34798935adce5f5357228;hb=43f6a50eb9573ce1b8a7f008de73b51ff57f8260;hpb=471684761a2039bbc89aa1e3c33c62de6bef86cf diff --git a/audiod_command.c b/audiod_command.c index ea8c1a58..a225b76b 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -6,8 +6,10 @@ /** \file audiod_command.c commands for para_audiod */ -#include "para.h" +#include +#include +#include "para.h" #include "audiod.cmdline.h" #include "list.h" #include "close_on_fork.h" @@ -68,7 +70,7 @@ static char *get_time_string(struct timeval *newest_stime) total = 0; out: return make_message( - "%s:%s%d:%02d [%d:%02d] (%d%%/%d:%02d)\n", + "%s: %s%d:%02d [%d:%02d] (%d%%/%d:%02d)\n", status_item_list[SI_PLAY_TIME], use_server_time? "~" : "", total / 60, @@ -86,7 +88,7 @@ __malloc static char *audiod_status_string(void) { const char *status = (audiod_status == AUDIOD_ON)? "on" : (audiod_status == AUDIOD_OFF)? "off": "sb"; - return make_message("%s:%s\n", status_item_list[SI_AUDIOD_STATUS], status); + return make_message("%s: %s\n", status_item_list[SI_AUDIOD_STATUS], status); } static struct timeval *wstime(void) @@ -118,7 +120,7 @@ __malloc static char *decoder_flags(void) flags[i] = flag; } flags[MAX_STREAM_SLOTS] = '\0'; - return make_message("%s:%s\n", status_item_list[SI_DECODER_FLAGS], + return make_message("%s: %s\n", status_item_list[SI_DECODER_FLAGS], flags); } @@ -235,7 +237,7 @@ int com_stat(int fd, __a_unused int argc, __a_unused char **argv) } if (mask & (1 << SI_AUDIOD_UPTIME)) { char *tmp, *us = uptime_str(); - tmp = make_message("%s:%s\n", + tmp = make_message("%s: %s\n", status_item_list[SI_AUDIOD_UPTIME], us); free(us); ret = client_write(fd, tmp); @@ -251,7 +253,7 @@ int com_stat(int fd, __a_unused int argc, __a_unused char **argv) free(s); } if (mask & (1 << SI_DECODER_FLAGS)) { - char *df =decoder_flags(); + char *df = decoder_flags(); ret = client_write(fd, df); if (ret < 0) goto out; @@ -490,7 +492,7 @@ void audiod_status_dump(void) old = stat_task->stat_item_values[SI_AUDIOD_UPTIME]; if (!old || strcmp(old, new)) { free(old); - tmp = make_message("%s:%s\n", + tmp = make_message("%s: %s\n", status_item_list[SI_AUDIOD_UPTIME], new); stat_client_write(tmp, SI_AUDIOD_UPTIME); free(tmp);