summaryrefslogtreecommitdiff
path: root/src/connectionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/connectionmanager.cpp')
-rw-r--r--src/connectionmanager.cpp8
1 files changed, 5 insertions, 3 deletions
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 )
195 lActive.erase( l ); 195 lActive.erase( l );
196 continue; 196 continue;
197 } 197 }
198 (*i)->poll(); 198 (*i)->getProtocol()->poll();
199 if( (*i)->hasOutput() ) 199 if( (*i)->hasOutput() )
200 { 200 {
201 (*i)->writeOutput(); 201 (*i)->writeOutput();
@@ -328,7 +328,8 @@ bool ConnectionManager::addConnection( int nSocket )
328void ConnectionManager::connect( 328void ConnectionManager::connect(
329 const char *lpAddress, 329 const char *lpAddress,
330 int nPort, 330 int nPort,
331 int nProtocolPort 331 int nProtocolPort,
332 Protocol *pNewProto
332 ) 333 )
333{ 334{
334 Connection *pCon = getInactiveConnection(); 335 Connection *pCon = getInactiveConnection();
@@ -336,8 +337,9 @@ void ConnectionManager::connect(
336 int nSocket = pCon->getSocket(); 337 int nSocket = pCon->getSocket();
337 FD_SET( nSocket, &fdActive ); 338 FD_SET( nSocket, &fdActive );
338 339
340 pCon->setProtocol( pNewProto );
339 pMonitor->onNewClientConnection( pCon, nProtocolPort ); 341 pMonitor->onNewClientConnection( pCon, nProtocolPort );
340 pCon->getProtocol()->onNewClientConnection(); 342 //pCon->getProtocol()->onNewClientConnection();
341 343
342 lActive.insert( lActive.end(), pCon ); 344 lActive.insert( lActive.end(), pCon );
343} 345}