1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

Tweaked error messages.

This commit is contained in:
Rolf Ahrenberg 2014-11-15 21:58:38 +02:00
parent 0bf841555b
commit 4a9a36a9c2
2 changed files with 12 additions and 7 deletions

7
rtsp.c
View File

@ -257,8 +257,11 @@ bool cSatipRtsp::ValidateLatestResponse(void)
SATIP_CURL_EASY_GETINFO(handleM, CURLINFO_RESPONSE_CODE, &rc); SATIP_CURL_EASY_GETINFO(handleM, CURLINFO_RESPONSE_CODE, &rc);
if (rc == 200) if (rc == 200)
result = true; result = true;
else if (rc != 0) else if (rc != 0) {
error("Tuner detected invalid status code %ld [device %d]", rc, tunerIdM); 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"); debug("cSatipRtsp::%s(%d): %s", __FUNCTION__, tunerIdM, result ? "ok" : "failed");

12
tuner.c
View File

@ -106,8 +106,10 @@ void cSatipTuner::Action(void)
tunerStatusM = tsTuned; tunerStatusM = tsTuned;
UpdatePids(true); UpdatePids(true);
} }
else else {
error("Tuning failed - re-tuning [device %d]", deviceIdM);
tunerStatusM = tsIdle; tunerStatusM = tsIdle;
}
break; break;
case tsTuned: case tsTuned:
//debug("cSatipTuner::%s(): tsTuned [device %d]", __FUNCTION__, deviceIdM); //debug("cSatipTuner::%s(): tsTuned [device %d]", __FUNCTION__, deviceIdM);
@ -128,23 +130,23 @@ void cSatipTuner::Action(void)
//debug("cSatipTuner::%s(): tsLocked [device %d]", __FUNCTION__, deviceIdM); //debug("cSatipTuner::%s(): tsLocked [device %d]", __FUNCTION__, deviceIdM);
tunerStatusM = tsLocked; tunerStatusM = tsLocked;
if (!UpdatePids()) { 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; tunerStatusM = tsSet;
break; break;
} }
if (!KeepAlive()) { 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; tunerStatusM = tsSet;
break; break;
} }
if (reconnection.TimedOut()) { if (reconnection.TimedOut()) {
debug("cSatipTuner::%s(): connection timeout - re-tuning [device %d]", __FUNCTION__, deviceIdM); error("Connection timeout - re-tuning [device %d]", deviceIdM);
tunerStatusM = tsSet; tunerStatusM = tsSet;
break; break;
} }
break; break;
default: default:
error("Unknown tuner status %d", tunerStatusM); error("Unknown tuner status %d [device %d]", tunerStatusM, deviceIdM);
break; break;
} }
sleepM.Wait(100); // to avoid busy loop and reduce cpu load sleepM.Wait(100); // to avoid busy loop and reduce cpu load