]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tvhlog: fixed thinko, add closelog() call
authorJaroslav Kysela <perex@perex.cz>
Mon, 6 Oct 2014 07:51:50 +0000 (09:51 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 6 Oct 2014 07:51:50 +0000 (09:51 +0200)
src/tvhlog.c

index 50e71fb18a0e95a0094733b0d6c0f86279c13eda..21af4dc12ee4b04785a9c08e0d405eaf687560f2 100644 (file)
@@ -436,7 +436,7 @@ tvhlog_end ( void )
   pthread_mutex_unlock(&tvhlog_mutex);
   pthread_join(tvhlog_tid, NULL);
   pthread_mutex_lock(&tvhlog_mutex);
-  while (!(msg = TAILQ_FIRST(&tvhlog_queue))) {
+  while ((msg = TAILQ_FIRST(&tvhlog_queue)) != NULL) {
     TAILQ_REMOVE(&tvhlog_queue, msg, link);
     tvhlog_process(msg, tvhlog_options, &fp, tvhlog_path);
   }
@@ -447,4 +447,5 @@ tvhlog_end ( void )
   free(tvhlog_path);
   htsmsg_destroy(tvhlog_debug);
   htsmsg_destroy(tvhlog_trace);
+  closelog();
 }