mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Rework cRecManager::createLocalTimer
This commit is contained in:
parent
ad1f0ba0d6
commit
549d42b487
17
recmanager.c
17
recmanager.c
@ -99,10 +99,11 @@ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
|
|||||||
if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost)
|
if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost)
|
||||||
((cTimer*)timer)->SetRemote(Setup.SVDRPDefaultHost);
|
((cTimer*)timer)->SetRemote(Setup.SVDRPDefaultHost);
|
||||||
LOCK_TIMERS_WRITE;
|
LOCK_TIMERS_WRITE;
|
||||||
cTimer *t = Timers->GetTimer(timer);
|
cTimers* timers = Timers;
|
||||||
#else
|
#else
|
||||||
cTimer *t = Timers.GetTimer(timer);
|
cTimers* timers = &Timers;
|
||||||
#endif
|
#endif
|
||||||
|
cTimer *t = timers->GetTimer(timer);
|
||||||
if (t) {
|
if (t) {
|
||||||
t->OnOff();
|
t->OnOff();
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
@ -114,19 +115,11 @@ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
|
|||||||
timer = t;
|
timer = t;
|
||||||
isyslog("timer %s reactivated", *t->ToDescr());
|
isyslog("timer %s reactivated", *t->ToDescr());
|
||||||
} else {
|
} else {
|
||||||
#if VDRVERSNUM >= 20301
|
timers->Add(timer);
|
||||||
Timers->Add(timer);
|
|
||||||
#else
|
|
||||||
Timers.Add(timer);
|
|
||||||
#endif
|
|
||||||
isyslog("timer %s added (active)", *timer->ToDescr());
|
isyslog("timer %s added (active)", *timer->ToDescr());
|
||||||
}
|
}
|
||||||
SetTimerPath(timer, event, path);
|
SetTimerPath(timer, event, path);
|
||||||
#if VDRVERSNUM >= 20301
|
timers->SetModified();
|
||||||
Timers->SetModified();
|
|
||||||
#else
|
|
||||||
Timers.SetModified();
|
|
||||||
#endif
|
|
||||||
return timer;
|
return timer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user