mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 10:21:10 +02:00
second try to fix segfault on TDT time sync
This commit is contained in:
@@ -1487,11 +1487,11 @@ void CTimeThread::run()
|
|||||||
rc = dmx->Read(static_buf, MAX_SECTION_LENGTH, timeoutInMSeconds);
|
rc = dmx->Read(static_buf, MAX_SECTION_LENGTH, timeoutInMSeconds);
|
||||||
#else
|
#else
|
||||||
int64_t start = time_monotonic_ms();
|
int64_t start = time_monotonic_ms();
|
||||||
|
int timeouts = 0;
|
||||||
/* 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 = getSection(static_buf, timeoutInMSeconds /6,timeouts);
|
||||||
} while (running && rc == 0
|
} while (running && rc < 1 && (time_monotonic_ms() - start) < (int64_t)timeoutInMSeconds*2);
|
||||||
&& (time_monotonic_ms() - start) < (int64_t)timeoutInMSeconds);
|
|
||||||
#endif
|
#endif
|
||||||
xprintf("%s: get DVB time ch 0x%012" PRIx64 " rc: %d neutrino_sets_time %d\n",
|
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);
|
name.c_str(), current_service, rc, messaging_neutrino_sets_time);
|
||||||
|
Reference in New Issue
Block a user