Ignore:
Timestamp:
Aug 5, 2009, 5:10:39 PM (15 years ago)
Author:
mies
Message:
 
File:
1 edited

Legend:

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

    r5718 r5721  
    121121                dmsg.setSourceEndpoint(&baseoverlay.getEndpointDescriptor());
    122122                dmsg.setFollowType(Discovery::successor);
    123                 dmsg.setTTL((uint8_t)5);
     123                dmsg.setTTL((uint8_t)2);
    124124                cmsg.encapsulate(&dmsg);
    125125                send(&cmsg, lnk);
     
    131131                dmsg.setSourceEndpoint(&baseoverlay.getEndpointDescriptor());
    132132                dmsg.setFollowType(Discovery::predecessor);
    133                 dmsg.setTTL((uint8_t)5);
     133                dmsg.setTTL((uint8_t)2);
    134134                cmsg.encapsulate(&dmsg);
    135135                send(&cmsg, lnk);
     
    340340                case Discovery::normal: {
    341341                        // closest node? yes-> split to follow successor and predecessor
    342                         if (table->is_closest_to(m->getDestination())) {
     342                        if (table->is_closest_to(m->getDestination())
     343                                || (table->get_successor()!=NULL && *table->get_successor() == m->getDestination())
     344                                || (table->get_predesessor()!=NULL && *table->get_predesessor() == m->getDestination())
     345                        ) {
    343346
    344347                                if (table->get_successor() != NULL) {
     
    370373                        else {
    371374                                // find next hop
    372                                 const route_item* item = table->get_next_hop(m->getDestination());
     375                                const route_item* item = table->get_next_hop(m->getDestination(),true);
    373376                                if (item == NULL || item->id == nodeid) break;
    374377                                logging_debug("routing discovery message to " <<
    375378                                                item->id.toString() );
    376                                 ChordMessage cmsg_p(*m);
    377                                 Discovery dmsg_p(*dmsg);
    378                                 cmsg_p.encapsulate(&dmsg_p);
    379                                 send(&cmsg_p, item->info);
     379                                send(m, item->info);
    380380                        }
    381381                        break;
Note: See TracChangeset for help on using the changeset viewer.