Changeset 3037 for source/ariba/communication/BaseCommunication.cpp
- Timestamp:
- Apr 22, 2009, 9:07:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/communication/BaseCommunication.cpp
r2802 r3037 55 55 const BaseCommunication::LinkDescriptor BaseCommunication::LinkDescriptor::UNSPECIFIED; 56 56 57 BaseCommunication::BaseCommunication(const NetworkLocator* _locallocator, const uint16_t _listenport) 58 : messageReceiver( NULL ), currentSeqnum( 0 ), listenport( _listenport ) { 57 BaseCommunication::BaseCommunication() 58 : messageReceiver(NULL), network(NULL), transport(NULL){ 59 } 60 61 BaseCommunication::~BaseCommunication(){ 62 } 63 64 void BaseCommunication::start(const NetworkLocator* _locallocator, const uint16_t _listenport){ 65 66 currentSeqnum = 0; 67 listenport = _listenport; 59 68 60 69 logging_info( "starting up base communication and creating transports ..." ); … … 139 148 } 140 149 141 BaseCommunication::~BaseCommunication() {150 void BaseCommunication::stop() { 142 151 143 152 logging_info( "stopping base communication and transport ..." ); … … 210 219 // warn if this link has some queued messages attached 211 220 if( descriptor.waitingmsg.size() > 0 ){ 212 logging_warn( "dropping link " << link.toString() << 221 logging_warn( "dropping link " << link.toString() << 213 222 " that has " << descriptor.waitingmsg.size() << " waiting messages" ); 214 223 } … … 368 377 const NetworkLocator* remoteLocator = dynamic_cast<const NetworkLocator*>(message->getSourceAddress()); 369 378 370 logging_debug( "localLocator=" << localLocator->toString() 379 logging_debug( "localLocator=" << localLocator->toString() 371 380 << " remoteLocator=" << remoteLocator->toString()); 372 381 … … 419 428 // the link is now open 420 429 // 421 430 422 431 BOOST_FOREACH( CommunicationEvents* i, eventListener ){ 423 432 i->onLinkUp( localLink, localLocator, remoteLocator ); … … 444 453 445 454 linkDesc.remoteLink = spovmsg->getLocalLink(); 446 linkDesc.linkup = true; 447 455 linkDesc.linkup = true; 456 448 457 logging_debug( "the link is now up with local link id " << spovmsg->getRemoteLink().toString() ); 449 458 … … 452 461 } 453 462 454 if( linkDesc.waitingmsg.size() > 0 ){ 463 if( linkDesc.waitingmsg.size() > 0 ){ 455 464 logging_info( "sending out queued messages on link " << linkDesc.localLink.toString() ); 456 465 … … 564 573 for( ; i != iend; i++){ 565 574 if( (*i).localLink != localLink) continue; 566 575 567 576 BOOST_FOREACH( Message* msg, i->waitingmsg ){ 568 577 delete msg;
Note:
See TracChangeset
for help on using the changeset viewer.