Changeset 5539 for source


Ignore:
Timestamp:
Jul 31, 2009, 4:39:08 PM (15 years ago)
Author:
mies
Message:
 
Location:
source/ariba/overlay
Files:
2 edited

Legend:

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

    r5528 r5539  
    205205}
    206206
     207LinkDescriptor* BaseOverlay::getSendDescriptor( const NodeID& nodeid ) {
     208        for (size_t i=0; i<links.size(); i++)
     209                if ( !links[i]->relay &&
     210                        links[i]->up &&
     211                        links[i]->communicationUp &&
     212                        links[i]->keepAliveMissed <= 1 &&
     213                        links[i]->remoteNode == nodeid &&
     214                        links[i]->service == OverlayInterface::OVERLAY_SERVICE_ID) {
     215                        links[i]->markAsRelay();
     216                        return links[i];
     217                }
     218        LinkDescriptor* ld = getDescriptor(overlayInterface->getNextLinkId(nodeid));
     219        if (ld->relay)
     220                return getRelayDescriptor(ld->localRelay);
     221}
     222
    207223/// routes a message over the overlay or directly sends it when a link is open
    208224seqnum_t BaseOverlay::sendOverlay( Message* message, const NodeID& nodeid ) {
     
    14601476                        return false;
    14611477                }
    1462 
    14631478        } /* switch */
    14641479
  • source/ariba/overlay/BaseOverlay.h

    r5481 r5539  
    420420        seqnum_t sendMessage( Message* message, const LinkDescriptor* ld );
    421421
     422        LinkDescriptor* getSendDescriptor( const NodeID& nodeid );
     423
    422424        /// routes a message over the overlay or directly sends it when a link is open
    423425        seqnum_t sendOverlay( Message* message, const NodeID& nodeid );
Note: See TracChangeset for help on using the changeset viewer.