From: Jaroslav Kysela Date: Thu, 7 May 2015 15:34:38 +0000 (+0200) Subject: main: shuffle epg_in_load X-Git-Tag: v4.1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c05806c1e907cf9e6eeaa8e3a755a540cc8c0d71;p=thirdparty%2Ftvheadend.git main: shuffle epg_in_load --- diff --git a/src/epgdb.c b/src/epgdb.c index 694aff6b2..f30e13dcb 100644 --- a/src/epgdb.c +++ b/src/epgdb.c @@ -186,7 +186,6 @@ void epg_init ( void ) } /* Process */ - epg_in_load = 1; memset(&stats, 0, sizeof(stats)); while ( remain > 4 ) { @@ -223,7 +222,6 @@ void epg_init ( void ) /* Cleanup */ htsmsg_destroy(m); } - epg_in_load = 0; free(sect); diff --git a/src/main.c b/src/main.c index ea3b83c6e..0b07e769b 100644 --- a/src/main.c +++ b/src/main.c @@ -962,6 +962,8 @@ main(int argc, char **argv) * Initialize subsystems */ + epg_in_load = 1; + tvhthread_create(&tasklet_tid, NULL, tasklet_thread, NULL); dbus_server_init(opt_dbus, opt_dbus_session); @@ -1037,6 +1039,7 @@ main(int argc, char **argv) bonjour_init(); epg_updated(); // cleanup now all prev ref's should have been created + epg_in_load = 0; pthread_mutex_unlock(&global_lock);