From 69cdcaae62982455c51e8eaf092be860c64a606b Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 29 Nov 2008 14:34:22 +0100 Subject: [PATCH] Avoid "no connection to para_server" message is server is stopped. --- audiod.c | 11 ++++++----- vss.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/audiod.c b/audiod.c index f0ce6258..33eac4b9 100644 --- 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 f33b95ac..4ed75792 100644 --- 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; -- 2.39.5