Changeset 5674 for source/ariba/overlay/modules
- Timestamp:
- Aug 4, 2009, 5:30:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/modules/chord/Chord.cpp
r5673 r5674 74 74 logging_debug("Request to setup link to " << endp.toString() ); 75 75 76 // check if node is already present77 if (!node.isUnspecified() && table->get(node)!=NULL) {78 logging_error("Node is already a neighbor!");79 return LinkID::UNSPECIFIED;80 }81 82 76 // check if we are already trying to establish a link 83 77 for (size_t i=0; i<pending.size(); i++) … … 218 212 // all nodes that I know, fingers, succ/pred 219 213 for (size_t i = 0; i < table->size(); i++){ 220 if ( /*(*table)[i]->ref_count != 0221 && */!(*table)[i]->info.isUnspecified())214 if ((*table)[i]->ref_count != 0 215 && !(*table)[i]->info.isUnspecified()) 222 216 nodelist.push_back((*table)[i]->id); 223 217 } … … 459 453 } 460 454 461 462 455 // remove orphan links 463 456 orphan_removal_counter++; … … 469 462 if (it->ref_count == 0 && !it->info.isUnspecified()) { 470 463 logging_info("Dropping orphaned link " << it->info.toString() << " to " << it->id.toString()); 471 //baseoverlay.dropLink(it->info);472 //it->info = LinkID::UNSPECIFIED;464 baseoverlay.dropLink(it->info); 465 it->info = LinkID::UNSPECIFIED; 473 466 } 474 467 }
Note:
See TracChangeset
for help on using the changeset viewer.