From: John Törnblom Date: Thu, 18 Oct 2012 16:44:33 +0000 (+0100) Subject: Log the reason for stoping a http stream. X-Git-Tag: v3.5~351 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b07fa5b35cd744f1371eb816a1c60fa2709bfcd;p=thirdparty%2Ftvheadend.git Log the reason for stoping a http stream. --- diff --git a/src/webui/webui.c b/src/webui/webui.c index c4f0b7874..7945bfd51 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -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);