Ignore:
Timestamp:
Apr 24, 2009, 10:04:11 AM (15 years ago)
Author:
Christoph Mayer
Message:

-fixed #30 (stress test pingpong, has some errors), #24 (autolinks for easy message sending)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/modules/onehop/OneHop.cpp

    r3057 r3067  
    146146        logging_info( "leaving onehop overlay structure" );
    147147
     148        // set the state to invalid, this will prevent from
     149        // handling onLinkDown events, as we are traversing the
     150        // overlayNodes map and the onLinkDown function is called
     151        // from the BaseOverlay and OneHop::onLinkDown will also
     152        // try to access the overlayNodes structure.
     153        state = OneHopStateInvalid;
     154
    148155        //
    149156        // close all links, this will indicate the other nodes that we left
     
    158165        }
    159166
    160         state = OneHopStateInvalid;
    161167        pendingLinks = 0;
    162168}
     
    164170
    165171void OneHop::onLinkDown(const LinkID& lnk, const NodeID& remote){
     172
     173        // don't handle when we are in state-invalid,
     174        // see comment in OneHop::leaveOverlay
     175        if( state == OneHopStateInvalid ) return;
    166176
    167177        //
Note: See TracChangeset for help on using the changeset viewer.