summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger@gmx.de>2010-06-20 09:11:55 +0200
committerChristian Wieninger <cwieninger@gmx.de>2010-06-20 09:11:55 +0200
commit8d0ac5e461ae0ddcbd5cfd76d3dfbd5aa372ad39 (patch)
tree5f36887d93c0e376f12e5562fcf7181808a0a60f
parentdef80c75960660aeb58d8dd0611e3a66ed2a9c7c (diff)
downloadvdr-plugin-epgsearch-8d0ac5e461ae0ddcbd5cfd76d3dfbd5aa372ad39.tar.gz
vdr-plugin-epgsearch-8d0ac5e461ae0ddcbd5cfd76d3dfbd5aa372ad39.tar.bz2
fixed file descriptor handling when SVDRP is broken
-rw-r--r--HISTORY3
-rw-r--r--HISTORY.DE2
-rw-r--r--svdrpclient.h8
3 files changed, 13 insertions, 0 deletions
diff --git a/HISTORY b/HISTORY
index 8461e8e..6125b24 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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:
diff --git a/HISTORY.DE b/HISTORY.DE
index caf4239..70b06b7 100644
--- a/HISTORY.DE
+++ b/HISTORY.DE
@@ -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;