Ignore:
Timestamp:
Mar 11, 2010, 9:28:24 AM (14 years ago)
Author:
Christoph Mayer
Message:

-branch merge back

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/modules/chord/Chord.cpp

    r6919 r7744  
    250250                logging_info("new routing neighbor: " << remote.toString()
    251251                                << " with link " << lnk.toString());
    252                 // replace with new link
    253                 if (item->info!=lnk && item->info.isUnspecified()==false)
    254                         baseoverlay.dropLink(item->info);
    255                 item->info = lnk;
     252
     253                // replace with new link if link is "better"
     254                if (item->info!=lnk && item->info.isUnspecified()==false) {
     255                        if (baseoverlay.compare( item->info, lnk ) == 1) {
     256                                logging_info("Replacing link due to concurrent link establishment.");
     257                                baseoverlay.dropLink(item->info);
     258                                item->info = lnk;
     259                        }
     260                } else {
     261                        item->info = lnk;
     262                }
    256263
    257264                // discover neighbors of new overlay neighbor
Note: See TracChangeset for help on using the changeset viewer.