diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2018-03-17 10:07:19 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2018-03-17 10:07:19 +0100 |
commit | 043929d85037306e5139daa91a1a638d7f444dcf (patch) | |
tree | edd1e8cc1c16bf22f2a64dea15a6a2fdf32664ed /timers.c | |
parent | af3cb1c9c3285fef9dca1eba1ee1cab0d7d76011 (diff) | |
download | vdr-043929d85037306e5139daa91a1a638d7f444dcf.tar.gz vdr-043929d85037306e5139daa91a1a638d7f444dcf.tar.bz2 |
Fixed a possible race condition with CONN vs. LSTT
Diffstat (limited to 'timers.c')
-rw-r--r-- | timers.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.c 4.17 2018/03/11 13:03:23 kls Exp $ + * $Id: timers.c 4.18 2018/03/17 10:07:19 kls Exp $ */ #include "timers.h" @@ -952,8 +952,14 @@ bool cTimers::StoreRemoteTimers(const char *ServerName, const cStringList *Remot else // processed all right entries DelTimer = nl; } - else if (ir < sr) // still have right entries + else if (ir < sr) { // still have right entries AddTimer = atoi((*RemoteTimers)[ir]); + if (!AddTimer) { + esyslog("ERROR: %s: error in timer settings: %s", ServerName, (*RemoteTimers)[ir]); + ir++; + continue; // let's see if we can process the rest + } + } else // processed all left and right entries break; if (AddTimer && DelTimer) { @@ -971,7 +977,7 @@ bool cTimers::StoreRemoteTimers(const char *ServerName, const cStringList *Remot Result = true; } else - esyslog("ERROR: %s: error in timer settings: %s", ServerName, v); + esyslog("ERROR: %d@%s: error in timer settings: %s", DelTimer, ServerName, v); } } else // identical timer, nothing to do @@ -1003,6 +1009,10 @@ bool cTimers::StoreRemoteTimers(const char *ServerName, const cStringList *Remot } il++; } + else { + esyslog("ERROR: oops while storing remote timers!"); + break; // let's not get stuck here! + } } return Result; } |