summaryrefslogtreecommitdiff
path: root/svdrp.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-05-31 14:06:07 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-05-31 14:06:07 +0200
commitbae02358a3a0f697bb10fe67bfc6ea183e36679b (patch)
treef64b2d2a77b18fa729421576bc0a39b667f1e2ee /svdrp.c
parentf97a59597f53e2a207b624ab32f491131253987c (diff)
downloadvdr-bae02358a3a0f697bb10fe67bfc6ea183e36679b.tar.gz
vdr-bae02358a3a0f697bb10fe67bfc6ea183e36679b.tar.bz2
Fixed a possible crash in case the SVDRP connection to a peer VDR is terminated while getting remote timers
Diffstat (limited to 'svdrp.c')
-rw-r--r--svdrp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/svdrp.c b/svdrp.c
index 9caf6edf..2b63c801 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
- * $Id: svdrp.c 4.19 2017/05/28 13:05:23 kls Exp $
+ * $Id: svdrp.c 4.20 2017/05/31 14:02:17 kls Exp $
*/
#include "svdrp.h"
@@ -385,7 +385,8 @@ void cSVDRPClient::Close(void)
file.Close();
socket.Close();
LOCK_TIMERS_WRITE;
- Timers->DelRemoteTimers(serverName);
+ if (Timers)
+ Timers->DelRemoteTimers(serverName);
}
}
@@ -463,6 +464,7 @@ bool cSVDRPClient::Process(cStringList *Response)
else if (r <= 0) {
isyslog("SVDRP < %s lost connection to remote server '%s'", ipAddress.Connection(), *serverName);
Close();
+ return false;
}
}
else if (!Response)