Ignore:
Timestamp:
Aug 4, 2009, 11:33:24 AM (15 years ago)
Author:
mies
Message:
 
File:
1 edited

Legend:

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

    r5644 r5646  
    102102/// sends a discovery message
    103103void 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
    106106        ChordMessage cmsg(ChordMessage::discovery, nodeid, destination);
    107107        Discovery dmsg;
     
    110110        dmsg.setTTL((uint8_t) ttl);
    111111        cmsg.encapsulate(&dmsg);
    112         msg.encapsulate(&cmsg);
    113112        discovery_count++;
     113        if (discovery_count<0) discovery_count = 0;
    114114        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);
    117116}
    118117
Note: See TracChangeset for help on using the changeset viewer.