]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
main: shuffle epg_in_load
authorJaroslav Kysela <perex@perex.cz>
Thu, 7 May 2015 15:34:38 +0000 (17:34 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 7 May 2015 15:34:38 +0000 (17:34 +0200)
src/epgdb.c
src/main.c

index 694aff6b29d24f02d4d81dc543eceb4e92d02951..f30e13dcbe08d019cbd4f220d213a448e9024220 100644 (file)
@@ -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);
 
index ea3b83c6ed398c327332a63643c58ea6154900c3..0b07e769b269c3044c5cf9e95958c2d4a89bdc0a 100644 (file)
@@ -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);