Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/neutrino.cpp b/src/neutrino.cpp
- index 62b3a41..cd6e442 100644
- --- a/src/neutrino.cpp
- +++ b/src/neutrino.cpp
- @@ -3860,6 +3860,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
- extern time_t timer_minutes;//timermanager.cpp
- extern bool timer_is_rec;//timermanager.cpp
- +extern bool timer_is_plugin;//timermanager.cpp //NI
- void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
- {
- @@ -3904,7 +3905,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
- CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN);
- stop_daemons(true /*retcode*/);//need here for timer_is_rec before saveSetup
- - g_settings.shutdown_timer_record_type = timer_is_rec;
- + g_settings.shutdown_timer_record_type = (timer_is_rec || timer_is_plugin); //NI
- saveSetup(NEUTRINO_SETTINGS_FILE);
- if(retcode) {
- diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp
- index feb437e..309629e 100644
- --- a/src/timerd/timermanager.cpp
- +++ b/src/timerd/timermanager.cpp
- @@ -47,6 +47,7 @@
- extern bool timeset;
- time_t timer_minutes;
- bool timer_is_rec;
- +bool timer_is_plugin; //NI
- static pthread_mutex_t tm_eventsMutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
- //------------------------------------------------------------
- @@ -62,6 +63,7 @@ void CTimerManager::Init(void)
- m_saveEvents = false;
- m_isTimeSet = false;
- timer_is_rec = false;
- + timer_is_plugin = false; //NI
- wakeup = 0;
- shutdown_eventID = -1;
- loadRecordingSafety();
- @@ -724,6 +726,7 @@ bool CTimerManager::shutdown()
- time_t nextAnnounceTime=0;
- bool status=false;
- timer_is_rec = false;
- + timer_is_plugin = false; //NI
- dprintf("stopping timermanager thread ...\n");
- dprintf("Waiting for timermanager thread to terminate ...\n");
- @@ -763,6 +766,11 @@ bool CTimerManager::shutdown()
- timer_is_rec = true;
- else
- timer_is_rec = false;
- + //NI
- + if ( event->eventType == CTimerd::TIMER_EXEC_PLUGIN )
- + timer_is_plugin = true;
- + else
- + timer_is_plugin = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement