diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/connectionmanager.cpp | 8 | ||||
-rw-r--r-- | src/connectionmanager.h | 2 |
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 ) | |||
328 | void ConnectionManager::connect( | 328 | void 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 | ||
98 | private: | 98 | private: |
99 | /** | 99 | /** |