aboutsummaryrefslogtreecommitdiff
path: root/src/connectionmanager.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-11-02 19:33:15 +0000
committerMike Buland <eichlan@xagasoft.com>2006-11-02 19:33:15 +0000
commit87f93e8511b373154dc0178137d701b5d6cfb669 (patch)
tree26b1ea126b5a9bd6f1634b4a5b6d64141b221065 /src/connectionmanager.cpp
parent80153a5bb5d3b41101e6bd6755b61fd0e57fadbc (diff)
downloadlibbu++-87f93e8511b373154dc0178137d701b5d6cfb669.tar.gz
libbu++-87f93e8511b373154dc0178137d701b5d6cfb669.tar.bz2
libbu++-87f93e8511b373154dc0178137d701b5d6cfb669.tar.xz
libbu++-87f93e8511b373154dc0178137d701b5d6cfb669.zip
Fixed a minor bug, connections should poll properly now.
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}