diff options
author | Christian Wieninger <cwieninger@gmx.de> | 2010-06-20 09:11:55 +0200 |
---|---|---|
committer | Christian Wieninger <cwieninger@gmx.de> | 2010-06-20 09:11:55 +0200 |
commit | 8d0ac5e461ae0ddcbd5cfd76d3dfbd5aa372ad39 (patch) | |
tree | 5f36887d93c0e376f12e5562fcf7181808a0a60f | |
parent | def80c75960660aeb58d8dd0611e3a66ed2a9c7c (diff) | |
download | vdr-plugin-epgsearch-8d0ac5e461ae0ddcbd5cfd76d3dfbd5aa372ad39.tar.gz vdr-plugin-epgsearch-8d0ac5e461ae0ddcbd5cfd76d3dfbd5aa372ad39.tar.bz2 |
fixed file descriptor handling when SVDRP is broken
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | HISTORY.DE | 2 | ||||
-rw-r--r-- | svdrpclient.h | 8 |
3 files changed, 13 insertions, 0 deletions
@@ -134,6 +134,9 @@ fixes: patch and to Stefan Bauer for pointing me to it. - fix a crash when toggling between with/without subtitle in timer info view for events that have (very) long "short" texts, thanks to Ville Skyttä for providing a patch. +- fixed file descriptor handling when there are errors in SVDRP communication, thanks to + Teemu Rantanen for providing a patch. + 2008-04-29: Version 0.9.24 new: @@ -142,6 +142,8 @@ fixes: den Patch und an Stefan Bauer für den Hinweis darauf. - Fix für einen Absturz beim Hin- und Herschalten von mit/ohne Untertitel bei Timern mit mit sehr langen Episodennamen, Danke an Ville Skyttä für den Patch. +- Korrektur beim file descriptor handling bei fehlerhafter SVDRP-Verbindung, Danke an + Teemu Rantanen für einen Patch. 2008-04-29: Version 0.9.24 diff --git a/svdrpclient.h b/svdrpclient.h index da16ee4..bd5771d 100644 --- a/svdrpclient.h +++ b/svdrpclient.h @@ -62,6 +62,12 @@ public: LogFile.eSysLog("EPGSearch: could not connect to VDR!"); } + ~cSVDRPClient() + { + if (sock >= 0) + close(sock); + } + bool SendCmd(const char* cmd) { if (!bConnected) @@ -79,6 +85,7 @@ public: LogFile.eSysLog("could not disconnect (%ld)!", rc); close(sock); + sock = -1; return cmdret; } bool Send(const char* szSend) @@ -112,6 +119,7 @@ public: if (recv(sock, &ch, 1, 0 ) < 0) { LogFile.eSysLog("EPGSearch: error receiving response!"); + free(csResp); return -1; } char* Temp = NULL; |