Changeset 5646 for source/ariba/overlay/modules
- Timestamp:
- Aug 4, 2009, 11:33:24 AM (15 years ago)
- Location:
- source/ariba/overlay/modules/chord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/modules/chord/Chord.cpp
r5644 r5646 102 102 /// sends a discovery message 103 103 void Chord::send_discovery_to(const NodeID& destination, int ttl) { 104 // logging_debug("Initiating discovery of " << destination.toString() );105 Message msg; 104 if ( table->size() == 0 ) return; 105 106 106 ChordMessage cmsg(ChordMessage::discovery, nodeid, destination); 107 107 Discovery dmsg; … … 110 110 dmsg.setTTL((uint8_t) ttl); 111 111 cmsg.encapsulate(&dmsg); 112 msg.encapsulate(&cmsg);113 112 discovery_count++; 113 if (discovery_count<0) discovery_count = 0; 114 114 const route_item* item = (*table)[ discovery_count % table->size() ]; 115 if (item!=NULL && !item->info.isUnspecified()) send(&msg,item->info); 116 // this->onMessage(&msg, NodeID::UNSPECIFIED, LinkID::UNSPECIFIED); 115 if (item!=NULL && !item->info.isUnspecified()) send(&cmsg,item->info); 117 116 } 118 117 -
source/ariba/overlay/modules/chord/Chord.h
r5644 r5646 87 87 88 88 // stabilization: sends a discovery message to the specified neighborhood 89 void send_discovery_to( const NodeID& destination, int ttl = 4);89 void send_discovery_to( const NodeID& destination, int ttl = 3 ); 90 90 91 91 public:
Note:
See TracChangeset
for help on using the changeset viewer.