From 4a9a36a9c2948d010c235e947bf135153c03465a Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sat, 15 Nov 2014 21:58:38 +0200 Subject: [PATCH] Tweaked error messages. --- rtsp.c | 7 +++++-- tuner.c | 12 +++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/rtsp.c b/rtsp.c index 329038e..cbcef6c 100644 --- a/rtsp.c +++ b/rtsp.c @@ -257,8 +257,11 @@ bool cSatipRtsp::ValidateLatestResponse(void) SATIP_CURL_EASY_GETINFO(handleM, CURLINFO_RESPONSE_CODE, &rc); if (rc == 200) result = true; - else if (rc != 0) - error("Tuner detected invalid status code %ld [device %d]", rc, tunerIdM); + else if (rc != 0) { + char *url = NULL; + SATIP_CURL_EASY_GETINFO(handleM, CURLINFO_EFFECTIVE_URL, &url); + error("Detected invalid status code %ld: %s [device %d]", rc, url, tunerIdM); + } } debug("cSatipRtsp::%s(%d): %s", __FUNCTION__, tunerIdM, result ? "ok" : "failed"); diff --git a/tuner.c b/tuner.c index c514841..4ab65bb 100644 --- a/tuner.c +++ b/tuner.c @@ -106,8 +106,10 @@ void cSatipTuner::Action(void) tunerStatusM = tsTuned; UpdatePids(true); } - else + else { + error("Tuning failed - re-tuning [device %d]", deviceIdM); tunerStatusM = tsIdle; + } break; case tsTuned: //debug("cSatipTuner::%s(): tsTuned [device %d]", __FUNCTION__, deviceIdM); @@ -128,23 +130,23 @@ void cSatipTuner::Action(void) //debug("cSatipTuner::%s(): tsLocked [device %d]", __FUNCTION__, deviceIdM); tunerStatusM = tsLocked; if (!UpdatePids()) { - debug("cSatipTuner::%s(): pid update failed - re-tuning [device %d]", __FUNCTION__, deviceIdM); + error("Pid update failed - re-tuning [device %d]", deviceIdM); tunerStatusM = tsSet; break; } if (!KeepAlive()) { - debug("cSatipTuner::%s(): keep-alive failed - re-tuning [device %d]", __FUNCTION__, deviceIdM); + error("Keep-alive failed - re-tuning [device %d]", deviceIdM); tunerStatusM = tsSet; break; } if (reconnection.TimedOut()) { - debug("cSatipTuner::%s(): connection timeout - re-tuning [device %d]", __FUNCTION__, deviceIdM); + error("Connection timeout - re-tuning [device %d]", deviceIdM); tunerStatusM = tsSet; break; } break; default: - error("Unknown tuner status %d", tunerStatusM); + error("Unknown tuner status %d [device %d]", tunerStatusM, deviceIdM); break; } sleepM.Wait(100); // to avoid busy loop and reduce cpu load