From d10808f7f99b61df5fcb7daf25dfa9ddebd45049 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sun, 5 Aug 2012 08:40:34 -0400 Subject: [PATCH] Initialize the epggrab mutex and condition variables. --- src/epggrab.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/epggrab.c b/src/epggrab.c index 1c9f9551..559a3659 100644 --- a/src/epggrab.c +++ b/src/epggrab.c @@ -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); }