aboutsummaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/connectionmanager.cpp8
-rw-r--r--src/connectionmanager.h2
2 files changed, 6 insertions, 4 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}
diff --git a/src/connectionmanager.h b/src/connectionmanager.h
index 23d059a..e80119b 100644
--- a/src/connectionmanager.h
+++ b/src/connectionmanager.h
@@ -93,7 +93,7 @@ public:
93 */ 93 */
94 void setConnectionMonitor( ConnectionMonitor *pNewMonitor ); 94 void setConnectionMonitor( ConnectionMonitor *pNewMonitor );
95 95
96 void connect( const char *lpAddress, int nPort, int nProtocolPort ); 96 void connect( const char *lpAddress, int nPort, int nProtocolPort, Protocol *pNewProto );
97 97
98private: 98private:
99 /** 99 /**