summaryrefslogtreecommitdiff
path: root/timers.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-04-20 10:08:04 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-04-20 10:08:04 +0200
commit686831caf5e314c424e1411f2c33df7e25c9b695 (patch)
tree294912aec8115a442cfa92da6e2601942d0231b5 /timers.c
parent1efd5e6b7e2bc3cc75fb547f28799f7c32fb08aa (diff)
downloadvdr-686831caf5e314c424e1411f2c33df7e25c9b695.tar.gz
vdr-686831caf5e314c424e1411f2c33df7e25c9b695.tar.bz2
Fixed editing a remote timer immediately after it has been created
Diffstat (limited to 'timers.c')
-rw-r--r--timers.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/timers.c b/timers.c
index 917be80c..4cf8fb7f 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 4.8 2017/03/30 15:08:11 kls Exp $
+ * $Id: timers.c 4.9 2017/04/20 09:15:06 kls Exp $
*/
#include "timers.h"
@@ -739,11 +739,13 @@ int cTimers::NewTimerId(void)
return ++lastTimerId; // no need for locking, the caller must have a lock on the global Timers list
}
-const cTimer *cTimers::GetById(int Id) const
+const cTimer *cTimers::GetById(int Id, const char *Remote) const
{
for (const cTimer *ti = First(); ti; ti = Next(ti)) {
- if (!ti->Remote() && ti->Id() == Id)
- return ti;
+ if (ti->Id() == Id) {
+ if (!Remote && !ti->Remote() || Remote && ti->Remote() && strcmp(Remote, ti->Remote()) == 0)
+ return ti;
+ }
}
return NULL;
}