SVDRP ignores EOF (clientside close)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 19 Jul 2006 12:59:36 +0200, Frank Schmirler wrote
> I would like to raise an issue with SVDRP. When the client doesn't 
> send QUIT but simply closes the connection, VDR happily ignores the 
> EOF returned by read. The socket will remain in state CLOSE_WAIT 
> until it's finally closed due to the SVDRP timeout. In the meantime 
> the SVDRP port remains blocked for other clients.

An update on this issue: with the implementation used before vdr-1.2.2 you
*will* get a broken pipe message, as cSVDRP::Close() tries to send a goodby
message to the client. This is not a problem, but as a "clean" solution I
would suggest:

--- svdrp.c.orig        2006-07-20 11:34:10.000000000 +0200
+++ svdrp.c     2006-07-20 11:39:51.000000000 +0200
@@ -1575,8 +1575,11 @@
               isyslog("lost connection to SVDRP client");
               Close();
               }
-           else
-              break;
+           else {
+              isyslog("SVDRP client closed connection");
+              file.Close();
+              DELETENULL(PUTEhandler);
+              }
            }
      if (Setup.SVDRPTimeout && time(NULL) - lastActivity > Setup.SVDRP
Timeout) {
         isyslog("timeout on SVDRP connection");


Cheers,
Frank


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux