diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-07-10 14:43:12 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-07-10 17:41:00 +0200 |
commit | 549d42b487452cb1b8ff0d1f1bd284562a50490c (patch) | |
tree | bd747c20a1044ae262edd0edb26f1a8464575418 | |
parent | ad1f0ba0d62d8a07a069d4403fcd4cdd90f9a1d7 (diff) | |
download | vdr-plugin-tvguide-549d42b487452cb1b8ff0d1f1bd284562a50490c.tar.gz vdr-plugin-tvguide-549d42b487452cb1b8ff0d1f1bd284562a50490c.tar.bz2 |
Rework cRecManager::createLocalTimer
-rw-r--r-- | recmanager.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/recmanager.c b/recmanager.c index eb9a43a..01e9af8 100644 --- a/recmanager.c +++ b/recmanager.c @@ -99,10 +99,11 @@ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) { if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost) ((cTimer*)timer)->SetRemote(Setup.SVDRPDefaultHost); LOCK_TIMERS_WRITE; - cTimer *t = Timers->GetTimer(timer); + cTimers* timers = Timers; #else - cTimer *t = Timers.GetTimer(timer); + cTimers* timers = &Timers; #endif + cTimer *t = timers->GetTimer(timer); if (t) { t->OnOff(); #if VDRVERSNUM >= 20301 @@ -114,19 +115,11 @@ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) { timer = t; isyslog("timer %s reactivated", *t->ToDescr()); } else { -#if VDRVERSNUM >= 20301 - Timers->Add(timer); -#else - Timers.Add(timer); -#endif + timers->Add(timer); isyslog("timer %s added (active)", *timer->ToDescr()); } SetTimerPath(timer, event, path); -#if VDRVERSNUM >= 20301 - Timers->SetModified(); -#else - Timers.SetModified(); -#endif + timers->SetModified(); return timer; } |