]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fixes for graceful exit patch
authorJaroslav Kysela <perex@perex.cz>
Wed, 5 Mar 2014 14:03:50 +0000 (15:03 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 5 Mar 2014 14:03:50 +0000 (15:03 +0100)
Mostly avahi related and cosmetic fixes for the graceful exit patch.

src/avahi.c
src/epgdb.c
src/htsp_server.c
src/tcp.c

index e290f818e06ee82edb06b85be13acaafabbf77af..c84a2f2184de42f887bbdb91776776cbd549299f 100644 (file)
@@ -39,6 +39,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
+#include <signal.h>
 
 #include <avahi-client/client.h>
 #include <avahi-client/publish.h>
@@ -248,13 +249,13 @@ client_callback(AvahiClient *c, AvahiClientState state, void *userdata)
 static void *
 avahi_thread(void *aux)
 {
-  const AvahiPoll *ap = avahi_simple_poll_get(asp);
+  const AvahiPoll *ap = avahi_simple_poll_get(avahi_asp);
 
   name = avahi_strdup("Tvheadend");
 
   avahi_client_new(ap, AVAHI_CLIENT_NO_FAIL, client_callback, NULL, NULL);
  
-  while(avahi_simple_poll_iterate(asp, -1) == 0);
+  while(avahi_simple_poll_iterate(avahi_asp, -1) == 0);
 
   return NULL;
   
index ec576d3d52ecdbc508e36a0cd73f17a497a760b3..db70347f8661dad350308d06a839ec1d4e67089c 100644 (file)
@@ -100,8 +100,8 @@ static void _epgdb_v1_process ( htsmsg_t *c, epggrab_stats_t *stats )
 /*
  * Process v2 data
  */
-static void _epgdb_v2_process (
-  char **sect, htsmsg_t *m, epggrab_stats_t *stats )
+static void
+_epgdb_v2_process( char **sect, htsmsg_t *m, epggrab_stats_t *stats )
 {
   int save = 0;
   const char *s;
index 45cccfc4488c24c45f4fd52c18974447aaf47dd5..c62283c83d7a605c79280e7cee2ce401c0240927 100644 (file)
@@ -1989,7 +1989,6 @@ htsp_read_loop(htsp_connection_t *htsp)
 
   while(tvheadend_running) {
 readmsg:
-    tvhlog(LOG_INFO, "htsp", "read_loop");
     if((r = htsp_read_message(htsp, &m, 0)) != 0)
       return r;
 
index 136a842e9837c71f01aa1b609b9c9b4c14eb089a..05b9c00414bdb86b0cd2e34ed1df83f4c5f572ec 100644 (file)
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -695,7 +695,7 @@ tcp_server_done(void)
   char c = 'E';
 
   tcp_server_running = 0;
-  write(tcp_server_pipe.wr, &c, 1);
+  tvh_write(tcp_server_pipe.wr, &c, 1);
 
   pthread_mutex_lock(&global_lock);
   LIST_FOREACH(tsl, &tcp_server_active, alink) {