From a1f1198801d0b12dc266e17c38e3ae4bb95ce4e6 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Fri, 22 Feb 2013 20:34:11 +0100 Subject: [PATCH] sectionsd: add workaround for 'unusual' return codes --- src/eitd/sectionsd.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 623279768..3a2ab38c6 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -1411,6 +1411,10 @@ void CTimeThread::run() /* speed up shutdown by looping around Read() */ do { 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); xprintf("%s: getting DVB time done : %d messaging_neutrino_sets_time %d\n", name.c_str(), rc, messaging_neutrino_sets_time); if (rc > 0) {