From: Andre Noll Date: Sat, 4 Jun 2011 11:38:02 +0000 (+0200) Subject: aft: Do not invalidate status items when closing the audio file table. X-Git-Tag: v0.4.8~30^2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=dfb5f82f2cf5f9e6b7367196a8a2b76b323ffb36;ds=sidebyside aft: Do not invalidate status items when closing the audio file table. 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. --- diff --git a/aft.c b/aft.c index be4d572e..078876be 100644 --- 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; } /**