diff --git a/src/webui/webui.c b/src/webui/webui.c index c4f0b787..7945bfd5 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);