Changeset 5658


Ignore:
Timestamp:
Aug 4, 2009, 2:20:26 PM (15 years ago)
Author:
mies
Message:
 
File:
1 edited

Legend:

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

    r5657 r5658  
    409409void Chord::eventFunction() {
    410410        stabilize_counter++;
    411         if (stabilize_counter < 0 || stabilize_counter > 3) {
     411        if (stabilize_counter < 0 || stabilize_counter == 1) {
    412412
    413413                // reset counter
     
    428428                // sending discovery
    429429                logging_debug("Sending discovery message to my neighbors and fingers");
    430                 stabilize_finger = ((stabilize_finger++) % table->get_finger_table_size() );
    431                 const NodeID& disc1 = nodeid;
    432                 const NodeID& disc2 = table->get_finger_table(stabilize_finger).get_compare().get_center();
     430                stabilize_finger = ((stabilize_finger+1) % table->get_finger_table_size() );
     431                const NodeID disc1 = nodeid;
     432                const NodeID disc2 = table->get_finger_table(stabilize_finger).get_compare().get_center();
    433433                send_discovery_to(disc1);
    434                 if (disc1 != disc2) send_discovery_to(disc2);
     434                if (disc1 != disc2)
     435                        send_discovery_to(disc2);
    435436
    436437                // remove orphan links
Note: See TracChangeset for help on using the changeset viewer.