]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
aft: Do not invalidate status items when closing the audio file table.
authorAndre Noll <maan@systemlinux.org>
Sat, 4 Jun 2011 11:38:02 +0000 (13:38 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 4 Jun 2011 11:38:02 +0000 (13:38 +0200)
Currently aft_close() frees the global variables status_items and
parser_friendly_status_items which are used for the stat comand of
para_server. This function is called on exit and when para_server
receives SIGHUP, the latter may happen while streaming. In this case
clients which connect after the SIGHUP do not see any aft status
items until the audio file changes.

Fix this flaw simply by not freeing the status item buffers until
they are recomputed anyway.

aft.c

diff --git a/aft.c b/aft.c
index be4d572e22f1517d1f5c3c970d30e6f6671f4158..078876be4d5533e438bf75c08f1c1988eba2b768 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2569,10 +2569,6 @@ static void aft_close(void)
 {
        osl_close_table(audio_file_table, OSL_MARK_CLEAN);
        audio_file_table = NULL;
-       free(status_items);
-       status_items = NULL;
-       free(parser_friendly_status_items);
-       parser_friendly_status_items = NULL;
 }
 
 /**