summaryrefslogtreecommitdiff
path: root/lib/searchtimer.c
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2018-03-10 08:22:06 +0100
committerhorchi <vdr@jwendel.de>2018-03-10 08:22:06 +0100
commit69218e79181c863a92e51d0d0b8f8a31b31c66c2 (patch)
treea9a24d6684c2484c47a93f624c630502a03bda19 /lib/searchtimer.c
parent267404563a6c67f4834f27e86fd89ec868528922 (diff)
downloadvdr-epg-daemon-69218e79181c863a92e51d0d0b8f8a31b31c66c2.tar.gz
vdr-epg-daemon-69218e79181c863a92e51d0d0b8f8a31b31c66c2.tar.bz2
2018-03-09: version 1.1.137 (horchi)\n bugfix: Try to fixed potential problem at timer modification\n\n1.1.137
Diffstat (limited to 'lib/searchtimer.c')
-rw-r--r--lib/searchtimer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/searchtimer.c b/lib/searchtimer.c
index 2e990a8..77b19f1 100644
--- a/lib/searchtimer.c
+++ b/lib/searchtimer.c
@@ -706,7 +706,7 @@ int cSearchTimer::checkTimers()
// check only active and pending timers with eventid
- if (!timerDb->getIntValue("ACTIVE") || !timerDb->hasValue("STATE", "P") || !timerDb->getIntValue("EVENTID"))
+ if (!timerDb->getIntValue("ACTIVE") || !timerDb->hasCharValue("STATE", tsPending) || !timerDb->getIntValue("EVENTID"))
continue;
if (timerDb->hasValue("SOURCE", "epgs")) // 'epgs' => epgsearch plugin
@@ -780,7 +780,7 @@ int cSearchTimer::checkTimers()
l2pTime(timerDb->getIntValue("_STARTTIME")).c_str(), l2pTime(useeventsDb->getIntValue("STARTTIME")).c_str(),
timerDb->getIntValue("ID"));
- modifyTimer(timerDb, taAdjust);
+ modifyTimer(timerDb, timerDb->hasCharValue("ACTION", taCreate) ? taCreate : taAdjust);
count++;
}
@@ -799,7 +799,7 @@ int cSearchTimer::checkTimers()
ptyRecName->getResult(), timerDb->getIntValue("ID"));
timerDb->setValue("FILE", ptyRecName->getResult());
- modifyTimer(timerDb, taModify);
+ modifyTimer(timerDb, timerDb->hasCharValue("ACTION", taCreate) ? taCreate : taModify);
count++;
}
}
@@ -829,8 +829,7 @@ int cSearchTimer::modifyTimer(cDbTable* timerDb, TimerAction action)
timerDb->update();
tell(0, "Created '%s' request for timer (%ld) at vdr '%s'",
- toName(action),
- timerDb->getIntValue("ID"), timerDb->getStrValue("VDRUUID"));
+ toName(action), timerDb->getIntValue("ID"), timerDb->getStrValue("VDRUUID"));
// triggerVdrs("TIMERJOB", timerDb->getStrValue("VDRUUID"));