Ignore:
Timestamp:
Apr 22, 2009, 9:07:53 PM (15 years ago)
Author:
Christoph Mayer
Message:

-jede Menge fixes und Umstellungen
-angefangen ariba/interface los zu werden, erste dateien sind weg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/communication/BaseCommunication.cpp

    r2802 r3037  
    5555const BaseCommunication::LinkDescriptor BaseCommunication::LinkDescriptor::UNSPECIFIED;
    5656
    57 BaseCommunication::BaseCommunication(const NetworkLocator* _locallocator, const uint16_t _listenport)
    58         : messageReceiver( NULL ), currentSeqnum( 0 ), listenport( _listenport ) {
     57BaseCommunication::BaseCommunication()
     58        : messageReceiver(NULL), network(NULL), transport(NULL){
     59}
     60
     61BaseCommunication::~BaseCommunication(){
     62}
     63
     64void BaseCommunication::start(const NetworkLocator* _locallocator, const uint16_t _listenport){
     65
     66        currentSeqnum = 0;
     67        listenport = _listenport;
    5968
    6069        logging_info( "starting up base communication and creating transports ..." );
     
    139148}
    140149
    141 BaseCommunication::~BaseCommunication() {
     150void BaseCommunication::stop() {
    142151
    143152        logging_info( "stopping base communication and transport ..." );
     
    210219        // warn if this link has some queued messages attached
    211220        if( descriptor.waitingmsg.size() > 0 ){
    212                 logging_warn( "dropping link " << link.toString() << 
     221                logging_warn( "dropping link " << link.toString() <<
    213222                        " that has " << descriptor.waitingmsg.size() << " waiting messages" );
    214223        }
     
    368377                const NetworkLocator* remoteLocator = dynamic_cast<const NetworkLocator*>(message->getSourceAddress());
    369378
    370                 logging_debug( "localLocator=" << localLocator->toString() 
     379                logging_debug( "localLocator=" << localLocator->toString()
    371380                                << " remoteLocator=" << remoteLocator->toString());
    372381
     
    419428                // the link is now open
    420429                //
    421                
     430
    422431                BOOST_FOREACH( CommunicationEvents* i, eventListener ){
    423432                        i->onLinkUp( localLink, localLocator, remoteLocator );
     
    444453
    445454                linkDesc.remoteLink = spovmsg->getLocalLink();
    446                 linkDesc.linkup = true; 
    447        
     455                linkDesc.linkup = true;
     456
    448457                logging_debug( "the link is now up with local link id " << spovmsg->getRemoteLink().toString() );
    449458
     
    452461                }
    453462
    454                 if( linkDesc.waitingmsg.size() > 0 ){ 
     463                if( linkDesc.waitingmsg.size() > 0 ){
    455464                        logging_info( "sending out queued messages on link " << linkDesc.localLink.toString() );
    456465
     
    564573        for( ; i != iend; i++){
    565574                if( (*i).localLink != localLink) continue;
    566                
     575
    567576                BOOST_FOREACH( Message* msg, i->waitingmsg ){
    568577                        delete msg;
Note: See TracChangeset for help on using the changeset viewer.