summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2006-08-24 01:10:53 +0000
committerphintuka <phintuka>2006-08-24 01:10:53 +0000
commit94c92e501e259acc9e34463b2e956dff0b075197 (patch)
tree93b8c270892086ea2b7c3ad291751e683bd8d007
parent1e26f013029efd068b045b13d0a7f60853efd033 (diff)
downloadxineliboutput-94c92e501e259acc9e34463b2e956dff0b075197.tar.gz
xineliboutput-94c92e501e259acc9e34463b2e956dff0b075197.tar.bz2
Fixed restoring primary device when using TCP connections
(new TCP data connection incremented client count)
-rw-r--r--frontend_svr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/frontend_svr.c b/frontend_svr.c
index cce9ae27..9deabfee 100644
--- a/frontend_svr.c
+++ b/frontend_svr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend_svr.c,v 1.15 2006-08-22 03:45:34 phintuka Exp $
+ * $Id: frontend_svr.c,v 1.16 2006-08-24 01:10:53 phintuka Exp $
*
*/
@@ -813,11 +813,10 @@ void cXinelibServer::Handle_Control_DATA(int cli, const char *arg)
if(1 == sscanf(arg, "%d", &clientId) &&
clientId >= 0 && clientId < MAXCLIENTS &&
fd_control[clientId] >= 0) {
+
+ CloseDataConnection(clientId);
+
fd_control[oldId] = -1;
- m_bUdp[clientId] = false;
- m_bMulticast[clientId] = false;
- m_iUdpFlowMask &= ~(1<<clientId);
- m_iMulticastMask &= ~(1<<clientId);
cli = clientId;
write_cmd(fd, "DATA\r\n");
@@ -825,6 +824,9 @@ void cXinelibServer::Handle_Control_DATA(int cli, const char *arg)
CREATE_NEW_WRITER;
fd_data[cli] = fd;
+
+ /* not anymore control connection, so dec primary device reference counter */
+ cXinelibDevice::Instance().ForcePrimaryDevice(false);
return;
}