From 7cd511686b72ab2ba46861b0262f29785161b13c Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 14 Feb 2018 21:58:22 +0100 Subject: [PATCH] try to fix segfault on TDT time sync Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/328a0a953db57ce5e96bde0ae48d1b3d86fb2cac Author: Jacek Jendrzej Date: 2018-02-14 (Wed, 14 Feb 2018) --- src/eitd/sectionsd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 2b867cc5d..be5cd150a 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -1490,10 +1490,12 @@ void CTimeThread::run() #else int64_t start = time_monotonic_ms(); /* speed up shutdown by looping around Read() */ + DMX::lock(); do { rc = dmx->Read(static_buf, MAX_SECTION_LENGTH, timeoutInMSeconds / 12); } while (running && rc == 0 && (time_monotonic_ms() - start) < (int64_t)timeoutInMSeconds); + DMX::unlock(); #endif xprintf("%s: get DVB time ch 0x%012" PRIx64 " rc: %d neutrino_sets_time %d\n", name.c_str(), current_service, rc, messaging_neutrino_sets_time);