Fixed handling client side termination of SVDRP connections

This commit is contained in:
Klaus Schmidinger 2006-07-22 14:04:51 +02:00
parent ee4fa90032
commit 375aa2563a
3 changed files with 12 additions and 3 deletions

View File

@ -1946,3 +1946,6 @@ Patrick Maier <maierp@informatik.tu-muenchen.de>
Norbert Wentz <norbert.wentz@online.de> Norbert Wentz <norbert.wentz@online.de>
for reporting a bug in handling relative volume settings in the call to for reporting a bug in handling relative volume settings in the call to
cStatus::MsgSetVolume() cStatus::MsgSetVolume()
Frank Schmirler <vdr@schmirler.de>
for fixing handling client side termination of SVDRP connections

View File

@ -4824,3 +4824,5 @@ Video Disk Recorder Revision History
(reported by Norbert Wentz). (reported by Norbert Wentz).
- Added a missing initialization of 'mutex' in cCiMenu::cCiMenu() and removed - Added a missing initialization of 'mutex' in cCiMenu::cCiMenu() and removed
some superfluous semicolons in ci.c (thanks to Marco Schlüßler). some superfluous semicolons in ci.c (thanks to Marco Schlüßler).
- Fixed handling client side termination of SVDRP connections (thanks to Frank
Schmirler).

10
svdrp.c
View File

@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured * and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection. * graphical interface that sits on top of an SVDRP connection.
* *
* $Id: svdrp.c 1.97 2006/06/11 09:04:36 kls Exp $ * $Id: svdrp.c 1.98 2006/07/22 13:59:43 kls Exp $
*/ */
#include "svdrp.h" #include "svdrp.h"
@ -1594,8 +1594,12 @@ bool cSVDRP::Process(void)
isyslog("lost connection to SVDRP client"); isyslog("lost connection to SVDRP client");
Close(); Close();
} }
else else {
break; isyslog("SVDRP client closed connection");
//TODO give cSVDRP::Close() an extra parameter to avoid this code duplication
file.Close();
DELETENULL(PUTEhandler);
}
} }
if (Setup.SVDRPTimeout && time(NULL) - lastActivity > Setup.SVDRPTimeout) { if (Setup.SVDRPTimeout && time(NULL) - lastActivity > Setup.SVDRPTimeout) {
isyslog("timeout on SVDRP connection"); isyslog("timeout on SVDRP connection");