]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Log the reason for stoping a http stream.
authorJohn Törnblom <john.tornblom@gmail.com>
Thu, 18 Oct 2012 16:44:33 +0000 (17:44 +0100)
committerJohn Törnblom <john.tornblom@gmail.com>
Fri, 19 Oct 2012 09:44:46 +0000 (11:44 +0200)
src/webui/webui.c

index c4f0b787464e0312077cc883054895668c64cabe..7945bfd51dc1b5c180fcb90b1af65781dbda809e 100644 (file)
@@ -180,10 +180,10 @@ http_stream_run(http_connection_t *hc, streaming_queue_t *sq,
           //Check socket status
           getsockopt(hc->hc_fd, SOL_SOCKET, SO_ERROR, (char *)&err, &errlen);  
           if(err) {
-           tvhlog(LOG_DEBUG, "webui",  "Client hung up, exit streaming");
+           tvhlog(LOG_DEBUG, "webui",  "Stop streaming %s, client hung up", hc->hc_url_orig);
            run = 0;
           }else if(timeouts >= 20) {
-           tvhlog(LOG_WARNING, "webui",  "Timeout waiting for packets");
+           tvhlog(LOG_WARNING, "webui",  "Stop streaming %s, timeout waiting for packets", hc->hc_url_orig);
            run = 0;
           }
       }
@@ -212,12 +212,14 @@ http_stream_run(http_connection_t *hc, streaming_queue_t *sq,
 
     case SMT_STOP:
       muxer_close(mux);
+      tvhlog(LOG_WARNING, "webui",  "Stop streaming %s, %s", hc->hc_url_orig, 
+            streaming_code2txt(sm->sm_code));
       run = 0;
       break;
 
     case SMT_SERVICE_STATUS:
       if(getsockopt(hc->hc_fd, SOL_SOCKET, SO_ERROR, &err, &errlen)) {
-       tvhlog(LOG_DEBUG, "webui",  "Client hung up, exit streaming");
+       tvhlog(LOG_DEBUG, "webui",  "Stop streaming %s, client hung up", hc->hc_url_orig);
        run = 0;
       }
       break;
@@ -226,19 +228,24 @@ http_stream_run(http_connection_t *hc, streaming_queue_t *sq,
       break;
 
     case SMT_NOSTART:
-      tvhlog(LOG_DEBUG, "webui",  "Couldn't start stream for %s", hc->hc_url_orig);
+      tvhlog(LOG_WARNING, "webui",  "Couldn't start streaming %s, %s", hc->hc_url_orig,
+            streaming_code2txt(sm->sm_code));
       run = 0;
       break;
 
     case SMT_EXIT:
-      muxer_close(mux);
+      tvhlog(LOG_WARNING, "webui",  "Stop streaming %s, %s", hc->hc_url_orig,
+            streaming_code2txt(sm->sm_code));
       run = 0;
       break;
     }
+
     streaming_msg_free(sm);
 
-    if(mux->m_errors)
+    if(mux->m_errors) {
+      tvhlog(LOG_WARNING, "webui",  "Stop streaming %s, muxer reported errors", hc->hc_url_orig);
       run = 0;
+    }
   }
 
   muxer_destroy(mux);