Changeset 5883 for source/ariba/overlay/modules
- Timestamp:
- Aug 12, 2009, 2:26:32 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/modules/chord/Chord.cpp
r5882 r5883 113 113 if ( remote == nodeid || link.isUnspecified()) return; 114 114 if ( table->size() == 0 ) return; 115 ttl = 2; 115 116 116 117 OverlayMsg msg( typeDiscovery ); 117 118 msg.setRelayed(true); 118 Discovery dmsg( Discovery::normal, (uint8_t) 2, baseoverlay.getEndpointDescriptor() );119 Discovery dmsg( Discovery::normal, (uint8_t)ttl, baseoverlay.getEndpointDescriptor() ); 119 120 msg.encapsulate(&dmsg); 120 121 … … 124 125 125 126 void Chord::discover_neighbors( const LinkID& link ) { 126 uint8_t ttl = 2;127 uint8_t ttl = 1; 127 128 { 128 129 // send predecessor discovery … … 419 420 420 421 // updating neighbors 422 logging_debug("Discover new ring neighbors"); 421 423 for (int i=0; i<table->size(); i++) { 422 424 LinkID id = (*table)[i]->info; … … 427 429 logging_debug("Sending discovery message to my neighbors and fingers"); 428 430 stabilize_finger = ((stabilize_finger+1) % table->get_finger_table_size() ); 429 const NodeID disc1 = nodeid; 430 const NodeID disc2 = table->get_finger_table(stabilize_finger).get_compare().get_center(); 431 send_discovery_to(disc1); 432 if (disc1 != disc2) 433 send_discovery_to(disc2); 434 431 const NodeID disc = table->get_finger_table(stabilize_finger).get_compare().get_center(); 432 if (disc != nodeid) 433 send_discovery_to(disc); 435 434 436 435 // remove orphan links
Note:
See TracChangeset
for help on using the changeset viewer.