Changeset 5484


Ignore:
Timestamp:
Jul 30, 2009, 2:02:11 PM (15 years ago)
Author:
mies
Message:
 
Location:
source/ariba
Files:
2 edited

Legend:

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

    r5481 r5484  
    15381538                                logging_force( "Link connection request is stale, closing: " << ld );
    15391539                                oldlinks.push_back( ld );
     1540                                continue;
    15401541                        }
    15411542                }
     
    15441545
    15451546                // drop links that are dropped and not used as relay
    1546                 if (ld->dropWhenRelaysLeft && !ld->usedAsRelay && !ld->autolink)
     1547                if (ld->dropWhenRelaysLeft && !ld->usedAsRelay && !ld->autolink) {
    15471548                        oldlinks.push_back( ld );
    1548                 else
     1549                        continue;
     1550                }
    15491551
    15501552                // auto-link time exceeded?
    1551                 if ( ld->autolink && difftime( now, ld->lastuse ) > 30 )
     1553                if ( ld->autolink && difftime( now, ld->lastuse ) > 30 ) {
    15521554                        oldlinks.push_back( ld );
     1555                        continue;
     1556                }
    15531557
    15541558                // keep alives missed? yes->
     
    15621566                                logging_force( "Link is stale, closing: " << ld );
    15631567                                oldlinks.push_back( ld );
     1568                                continue;
    15641569                        }
    15651570                }
     1571        }
     1572
     1573        // drop links
     1574        BOOST_FOREACH( const LinkDescriptor* ld, oldlinks ) {
     1575
     1576                vector<LinkID>::iterator it = std::find(
     1577                                bootstrapLinks.begin(), bootstrapLinks.end(), ld->communicationId);
     1578
     1579                if (!ld->communicationId.isUnspecified() && it != bootstrapLinks.end() ){
     1580                        logging_force( "Not dropping initiator link: " << ld );
     1581                        continue;
     1582                }
     1583                logging_force( "Link timed out. Dropping " << ld );
     1584                dropLink( ld->overlayId );
    15661585        }
    15671586
     
    15701589        if (counter>=4) showLinkState();
    15711590        if (counter>=4 || counter<0) counter = 0;
    1572 
    1573         // drop links
    1574         BOOST_FOREACH( const LinkDescriptor* ld, oldlinks ) {
    1575 
    1576                 vector<LinkID>::iterator it = std::find(
    1577                                 bootstrapLinks.begin(), bootstrapLinks.end(), ld->communicationId);
    1578 
    1579                 if (!ld->communicationId.isUnspecified() && it != bootstrapLinks.end() ){
    1580                         logging_force( "Not dropping initiator link: " << ld );
    1581                         continue;
    1582                 }
    1583                 logging_force( "Link timed out. Dropping " << ld );
    1584                 dropLink( ld->overlayId );
    1585         }
    15861591}
    15871592
  • source/ariba/utility/messages/Message.h

    r5482 r5484  
    209209                        T* payloadMsg = new T();
    210210                        data_deserialize( payloadMsg, payload );
    211                         //dropPayload();
    212211                        return payloadMsg;
    213212                }
Note: See TracChangeset for help on using the changeset viewer.