]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
misc: fix a bunch of shutdown error messages that are irrelevant
authorAdam Sutton <dev@adamsutton.me.uk>
Tue, 18 Mar 2014 09:54:30 +0000 (09:54 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Tue, 18 Mar 2014 21:46:11 +0000 (21:46 +0000)
src/http/http_client.c
src/imagecache.c
src/input/mpegts/iptv/iptv.c

index e7a0534f944256ad16f64e2b69de598b433a9201..84b64c9c3208aaa9b80e0b4b7234e8c08e71b553 100644 (file)
@@ -145,7 +145,8 @@ http_thread ( void *p )
   while (tvheadend_running) {
     n = tvhpoll_wait(http_poll, &ev, 1, -1);
     if (n < 0) {
-      tvherror("http_client", "tvhpoll_wait() error");
+      if (tvheadend_running)
+        tvherror("http_client", "tvhpoll_wait() error");
       break;
     } else {
       pthread_mutex_lock(&http_lock);
index 36202ada01867ba8b0659521c0b77a3a59bbee45..bc219acd16403e8b0514381a59a55a8530ad51f2 100644 (file)
@@ -222,7 +222,6 @@ imagecache_thread ( void *p )
   }
   pthread_mutex_unlock(&global_lock);
 
-  fprintf(stderr, "imagecache thread end\n");
   return NULL;
 }
 
index 9cc1f729386b4b3adbb9954923c430810d762d9b..964a81d1b5bad176f056cc92f037cadc18a33ca2 100644 (file)
@@ -266,9 +266,11 @@ iptv_input_thread ( void *aux )
   while ( tvheadend_running ) {
     nfds = tvhpoll_wait(iptv_poll, &ev, 1, -1);
     if ( nfds < 0 ) {
-      tvhlog(LOG_ERR, "iptv", "poll() error %s, sleeping 1 second",
-             strerror(errno));
-      sleep(1);
+      if (tvheadend_running) {
+        tvhlog(LOG_ERR, "iptv", "poll() error %s, sleeping 1 second",
+               strerror(errno));
+        sleep(1);
+      }
       continue;
     } else if ( nfds == 0 ) {
       continue;