]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Initialize the epggrab mutex and condition variables.
authorBen Kibbey <bjk@luxsci.net>
Sun, 5 Aug 2012 12:40:34 +0000 (08:40 -0400)
committerAdam Sutton <dev@adamsutton.me.uk>
Mon, 6 Aug 2012 12:08:50 +0000 (13:08 +0100)
src/epggrab.c

index 1c9f9551e49d8e1c21a8b17145f04642b1e4f5b2..559a3659511e281e5f38d7601c91190d47afd67e 100644 (file)
@@ -39,9 +39,9 @@
 #include "service.h"
 
 /* Thread protection */
-int                   epggrab_confver;
+static int                   epggrab_confver;
 pthread_mutex_t       epggrab_mutex;
-pthread_cond_t        epggrab_cond;
+static pthread_cond_t        epggrab_cond;
 
 /* Config */
 uint32_t              epggrab_interval;
@@ -346,6 +346,9 @@ void epggrab_init ( void )
   extern TAILQ_HEAD(, epggrab_ota_mux) ota_mux_all;
   TAILQ_INIT(&ota_mux_all);
 
+  pthread_mutex_init(&epggrab_mutex, NULL);
+  pthread_cond_init(&epggrab_cond, NULL);
+  
   /* Initialise modules */
   eit_init();
   xmltv_init();
@@ -362,5 +365,6 @@ void epggrab_init ( void )
   pthread_attr_init(&tattr);
   pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
   pthread_create(&tid, &tattr, _epggrab_internal_thread, NULL);
+  pthread_attr_destroy(&tattr);
 }