Ignore:
Timestamp:
Apr 24, 2009, 4:34:53 PM (15 years ago)
Author:
Christoph Mayer
Message:

-some further fixed in the protocols and cleaning the interfaces for stuff we have no functionality yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/BaseOverlay.cpp

    r3067 r3071  
    9898
    9999        ovl.visShowNodeBubble ( ovlId, nodeId, "joining..." );
    100         logging_info( "starting to join spovnet " << id.toString() << "...");
     100        logging_info( "starting to join spovnet " << id.toString() <<
     101                        " with nodeid " << nodeId.toString());
    101102
    102103        //
     
    145146        logging_debug( "leaving overlay" );
    146147        // first, leave the overlay interface
    147         overlayInterface->leaveOverlay();
     148        if( overlayInterface != NULL )
     149                overlayInterface->leaveOverlay();
    148150
    149151        // --> leave spovnet
     
    177179        //
    178180
    179         logging_info("creating spovnet " + id.toString());
     181        logging_info( "creating spovnet " + id.toString() << " with nodeid " << nodeId.toString() );
    180182
    181183        spovnetId = id;
     
    502504        if( i == linkMapping.end() ) return;
    503505
    504         if( i->second.interface != NULL )
     506        if( i->second.interface != NULL ){
    505507                i->second.interface->onLinkChanged( id, i->second.node );
     508                // call onLinkQoSChanged?
     509        }
    506510
    507511        i->second.markused();
     
    537541
    538542        // TODO: convert QoSParameterSet to the LinkProperties properties
    539         if( i->second.interface != NULL )
    540                 i->second.interface->onLinkQoSChanged( id, i->second.node, LinkProperties::DEFAULT );
     543        if( i->second.interface != NULL ){
     544                // TODO: currently not in the interface: i->second.interface->onLinkQoSChanged( id, i->second.node, LinkProperties::DEFAULT );
     545        }
    541546
    542547        i->second.markused();
     548}
     549
     550bool BaseOverlay::onLinkRequest( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote ){
     551
     552        // also see in the receiveMessage function. there the higher layer service
     553        // is asked whether to accept link requests, but there a basic link association is
     554        // already built up, so we know the node id
     555        logging_debug("received link request from " << remote->toString() << ", accepting");
     556        return true;
    543557}
    544558
     
    791805
    792806                i->second.interface = iface;
    793                 iface->onLinkUp( link, sourcenode );
    794807                i->second.markused();
    795808
    796                 return true ;
     809                //
     810                // ask the service whether it wants to accept this link
     811                //
     812
     813                if( iface->onLinkRequest(sourcenode) ){
     814                        iface->onLinkUp( link, sourcenode );
     815                } else {
     816                        // prevent onLinkDown calls to the service
     817                        i->second.interface = NULL;
     818                        // drop the link
     819                        dropLink( link );
     820                }
     821
     822                return true;
    797823
    798824        } // else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeUpdate) )
Note: See TracChangeset for help on using the changeset viewer.