Changeset 5878 for source/ariba


Ignore:
Timestamp:
Aug 12, 2009, 10:43:54 AM (15 years ago)
Author:
mies
Message:
 
File:
1 edited

Legend:

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

    r5876 r5878  
    116116        // search for a descriptor that is already up
    117117        BOOST_FOREACH( LinkDescriptor* lp, links )
    118                 if (lp->autolink && lp->remoteNode == node && lp->service == service && lp->up)
     118                if (lp->autolink && lp->remoteNode == node && lp->service == service && lp->up && lp->keepAliveMissed == 0)
    119119                        return lp;
    120120        // if not found, search for one that is about to come up...
    121121        BOOST_FOREACH( LinkDescriptor* lp, links )
    122                 if (lp->autolink && lp->remoteNode == node && lp->service == service )
     122                if (lp->autolink && lp->remoteNode == node && lp->service == service && lp->keepAliveMissed == 0 )
    123123                        return lp;
    124124        return NULL;
     
    154154                        if (ld->keepAliveMissed > 4) {
    155155                                logging_info( "Link connection request is stale, closing: " << ld );
    156                                 ld->relaying = false;
    157156                                oldlinks.push_back( ld );
    158157                                continue;
     
    183182                        if (ld->keepAliveMissed >= 4) {
    184183                                logging_info( "Link is stale, closing: " << ld );
    185                                 ld->relaying = false;
    186184                                oldlinks.push_back( ld );
    187185                                continue;
     
    192190        // drop links
    193191        BOOST_FOREACH( const LinkDescriptor* ld, oldlinks ) {
    194 /*
    195                 vector<LinkID>::iterator it = std::find(
    196                                 bootstrapLinks.begin(), bootstrapLinks.end(), ld->communicationId);
    197 
    198                 if (!ld->communicationId.isUnspecified() && it != bootstrapLinks.end() ){
    199                         logging_info( "Not dropping initiator link: " << ld );
    200                         continue;
    201                 }
    202 */
    203192                logging_info( "Link timed out. Dropping " << ld );
     193                ld->relaying = false;
    204194                dropLink( ld->overlayId );
    205195        }
     
    402392                || ld->relayed
    403393                || !message->isRelayed()
     394                || !message->getService() == OverlayInterface::OVERLAY_SERVICE_ID
    404395                || message->getSourceNode()==nodeId ) return;
    405396
Note: See TracChangeset for help on using the changeset viewer.