summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-07-14 09:49:07 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-07-14 09:49:07 +0200
commit1930e13961d581d3b14b53875d438cd6d5354931 (patch)
tree5199f2f956fa15d47ebaaa6c061c9240125d5a72
parent497183cd733868e1ccedfb025b247a469eda074d (diff)
downloadvdr-1930e13961d581d3b14b53875d438cd6d5354931.tar.gz
vdr-1930e13961d581d3b14b53875d438cd6d5354931.tar.bz2
Fixed a hanging SVDRP connection if the client dies without issuing QUIT
-rw-r--r--HISTORY1
-rw-r--r--svdrp.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 3c18e90d..afbcf428 100644
--- a/HISTORY
+++ b/HISTORY
@@ -551,3 +551,4 @@ Video Disk Recorder Revision History
- Fixed handling the "Green" button in the "Schedules" menu for channels that
have a second audio PID.
- Fixed high system load when displaying a still picture in replay.
+- Fixed a hanging SVDRP connection if the client dies without issuing QUIT.
diff --git a/svdrp.c b/svdrp.c
index df4ffacc..e62198d9 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 1.18 2001/04/01 16:06:54 kls Exp $
+ * $Id: svdrp.c 1.19 2001/07/14 09:45:55 kls Exp $
*/
#define _GNU_SOURCE
@@ -955,8 +955,10 @@ void cSVDRP::Process(void)
}
lastActivity = time(NULL);
}
- else if (r < 0)
+ else if (r <= 0) {
+ isyslog(LOG_INFO, "lost connection to SVDRP client");
Close();
+ }
}
else if (Setup.SVDRPTimeout && time(NULL) - lastActivity > Setup.SVDRPTimeout) {
isyslog(LOG_INFO, "timeout on SVDRP connection");