From 4621bff719e1beeb87d7bc053db61668e4bea151 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 16 Mar 2012 20:37:21 +0400 Subject: [PATCH] eitd/sectionsd.cpp: new bugs fixes: block change() until time is set; always wakeup time thread when unpaused Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b144aeb95239dabeb7f9f8e5e6840fdc37c3c126 Author: [CST] Focus Date: 2012-03-16 (Fri, 16 Mar 2012) --- src/eitd/sectionsd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 4e0671fe3..80aa9af9c 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -870,7 +870,7 @@ static void commandPauseScanning(int connfd, char *data, const unsigned dataLeng scanning = 1; /* FIXME should we stop time updates if not scanning ? flag if ntp update was good ? */ - if (!ntpenable) + //if (!ntpenable) { threadTIME.change(0); } @@ -1381,6 +1381,8 @@ void CTimeThread::run() name.c_str(), sleep_time, running, scanning); #endif do { + if(!scanning) + sleep_time = 0; real_pause(); int rs = Sleep(); #ifdef DEBUG_TIME_THREAD @@ -1482,11 +1484,13 @@ void CSectionThread::run() addFilters(); + real_pauseCounter = 1; if (wait_for_time) { threadTIME.waitForTimeset(); time_t now = time(NULL); xprintf("%s::run:: time set: %s", name.c_str(), ctime(&now)); } + real_pauseCounter = 0; DMX::start();