Avoid "no connection to para_server" message is server is stopped.
authorAndre Noll <maan@systemlinux.org>
Sat, 29 Nov 2008 13:34:22 +0000 (14:34 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 29 Nov 2008 13:34:22 +0000 (14:34 +0100)
audiod.c
vss.c

index f0ce625..33eac4b 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -874,11 +874,6 @@ static void close_stat_pipe(void)
        stat_task->offset_seconds = 0;
        audiod_status_dump();
        stat_task->playing = 0;
-       stat_item_values[SI_BASENAME] = make_message(
-               "%s: no connection to para_server\n",
-               status_item_list[SI_BASENAME]);
-       stat_client_write(stat_item_values[SI_BASENAME],
-               SI_BASENAME);
 }
 
 /**
@@ -1035,6 +1030,12 @@ static void status_pre_select(struct sched *s, struct task *t)
                client_open(argc, argv, &st->ct);
                set_stat_task_restart_barrier(5);
        }
+       free(stat_item_values[SI_BASENAME]);
+       stat_item_values[SI_BASENAME] = make_message(
+               "%s: no connection to para_server\n",
+               status_item_list[SI_BASENAME]);
+       stat_client_write(stat_item_values[SI_BASENAME],
+               SI_BASENAME);
        st->last_status_read = *now;
 out:
        start_stop_decoders(s);
diff --git a/vss.c b/vss.c
index f33b95a..4ed7579 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -501,6 +501,7 @@ void init_vss_task(int afs_socket)
        free(hn);
        free(home);
        mmd->sender_cmd_data.cmd_num = -1;
+       make_empty_status_items(mmd->afd.verbose_ls_output);
        if (conf.autoplay_given) {
                struct timeval tmp;
                mmd->vss_status_flags |= VSS_PLAYING;