summaryrefslogtreecommitdiff
path: root/client/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/socket.c')
-rw-r--r--client/socket.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/client/socket.c b/client/socket.c
index e59c705..5db6efe 100644
--- a/client/socket.c
+++ b/client/socket.c
@@ -1,5 +1,5 @@
/*
- * $Id: socket.c,v 1.7 2007/01/15 11:45:48 schmirl Exp $
+ * $Id: socket.c,v 1.8 2007/04/24 10:57:34 schmirl Exp $
*/
#include <tools/select.h>
@@ -215,6 +215,24 @@ bool cClientSocket::CreateDataConnection(eSocketId Id) {
return true;
}
+bool cClientSocket::CloseDataConnection(eSocketId Id) {
+ //if (!CheckConnection()) return false;
+
+ CMD_LOCK;
+
+ if(Id == siLive || Id == siLiveFilter)
+ if (m_DataSockets[Id] != NULL) {
+ std::string command = (std::string)"ABRT " + (const char*)itoa(Id);
+ if (!Command(command, 220)) {
+ if (errno == 0)
+ esyslog("ERROR: Streamdev: Couldn't cleanly close data connection");
+ //return false;
+ }
+ DELETENULL(m_DataSockets[Id]);
+ }
+ return true;
+}
+
bool cClientSocket::SetChannelDevice(const cChannel *Channel) {
if (!CheckConnection()) return false;