From 87f93e8511b373154dc0178137d701b5d6cfb669 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 2 Nov 2006 19:33:15 +0000 Subject: Fixed a minor bug, connections should poll properly now. --- src/connectionmanager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/connectionmanager.cpp') diff --git a/src/connectionmanager.cpp b/src/connectionmanager.cpp index 367b9d7..a927092 100644 --- a/src/connectionmanager.cpp +++ b/src/connectionmanager.cpp @@ -195,7 +195,7 @@ bool ConnectionManager::scanConnections( int nTimeout, bool bForceTimeout ) lActive.erase( l ); continue; } - (*i)->poll(); + (*i)->getProtocol()->poll(); if( (*i)->hasOutput() ) { (*i)->writeOutput(); @@ -328,7 +328,8 @@ bool ConnectionManager::addConnection( int nSocket ) void ConnectionManager::connect( const char *lpAddress, int nPort, - int nProtocolPort + int nProtocolPort, + Protocol *pNewProto ) { Connection *pCon = getInactiveConnection(); @@ -336,8 +337,9 @@ void ConnectionManager::connect( int nSocket = pCon->getSocket(); FD_SET( nSocket, &fdActive ); + pCon->setProtocol( pNewProto ); pMonitor->onNewClientConnection( pCon, nProtocolPort ); - pCon->getProtocol()->onNewClientConnection(); + //pCon->getProtocol()->onNewClientConnection(); lActive.insert( lActive.end(), pCon ); } -- cgit v1.2.3