]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Always print a space after each status item identifier.
authorAndre Noll <maan@systemlinux.org>
Thu, 1 Nov 2007 20:50:18 +0000 (21:50 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 1 Nov 2007 20:50:18 +0000 (21:50 +0100)
audiod_command.c
command.c
gui.c

index d424cf2e76f32ca90058685b68186b5a00be6a2b..a225b76b83f848c5f9ec31b8a141a64d932212ee 100644 (file)
@@ -70,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,
@@ -88,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)
@@ -120,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);
 }
 
@@ -237,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);
@@ -253,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;
@@ -492,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);
index 219e19a520a5314fd69f669dbc0372001c0df338..6c60ef972f97aef62a2bf24425bd6a8d103b77c7 100644 (file)
--- a/command.c
+++ b/command.c
@@ -113,15 +113,15 @@ static char *get_status(struct misc_meta_data *nmmd)
        }
        gettimeofday(&now, NULL);
        ret = make_message(
-               "%s:%zu\n" /* file size */
-               "%s:%s\n" /* mtime */
-               "%s:%s\n" /* status */
-               "%s:%s\n" /* status flags */
-               "%s:%li\n" /* offset */
-               "%s:%s\n" /* afs mode */
-               "%s:%s\n" /* server uptime */
-               "%s:%lu.%lu\n" /* stream start */
-               "%s:%lu.%lu\n" /* current server time */
+               "%s: %zu\n" /* file size */
+               "%s: %s\n" /* mtime */
+               "%s: %s\n" /* status */
+               "%s: %s\n" /* status flags */
+               "%s: %li\n" /* offset */
+               "%s: %s\n" /* afs mode */
+               "%s: %s\n" /* server uptime */
+               "%s: %lu.%lu\n" /* stream start */
+               "%s: %lu.%lu\n" /* current server time */
                "%s\n", /* afs status info */
                status_item_list[SI_FILE_SIZE], nmmd->size / 1024,
                status_item_list[SI_MTIME], mtime,
diff --git a/gui.c b/gui.c
index f33fa7c8c42f81ab0f9ea4c724473d9861dd91e2..e60e6f54e39daf44a3fec62653d995107d9cf7ba 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -749,7 +749,7 @@ static int check_stat_line(char *line, __a_unused void *data)
 //     PARA_INFO_LOG("%s: checking: %s\n", __func__, line);
        i = stat_line_valid(line);
        if (i >= 0) {
-               line += strlen(status_item_list[i]) + 1;
+               line += strlen(status_item_list[i]) + 2;
                free(stat_content[i]);
                stat_content[i] = para_strdup(line);
                print_stat_item(i);