sectionsd: add workaround for 'unusual' return codes

This commit is contained in:
Stefan Seyfried
2013-02-22 20:34:11 +01:00
parent 889c518a16
commit a1f1198801

View File

@@ -1411,6 +1411,10 @@ void CTimeThread::run()
/* speed up shutdown by looping around Read() */ /* speed up shutdown by looping around Read() */
do { do {
rc = dmx->Read(static_buf, MAX_SECTION_LENGTH, timeoutInMSeconds / 12); rc = dmx->Read(static_buf, MAX_SECTION_LENGTH, timeoutInMSeconds / 12);
#if HAVE_COOL_HARDWARE
if (rc < 0) /* libcoolstream returns -1 on timeout ??? ... */
rc = 0; /* ...and does not set a useful errno (EINVAL) */
#endif
} while (running && rc == 0 && (time_monotonic_ms() - start) < timeoutInMSeconds); } while (running && rc == 0 && (time_monotonic_ms() - start) < timeoutInMSeconds);
xprintf("%s: getting DVB time done : %d messaging_neutrino_sets_time %d\n", name.c_str(), rc, messaging_neutrino_sets_time); xprintf("%s: getting DVB time done : %d messaging_neutrino_sets_time %d\n", name.c_str(), rc, messaging_neutrino_sets_time);
if (rc > 0) { if (rc > 0) {