[chord] Possible bug in join.c

Andreas Binzenhoefer binzenhoefer at informatik.uni-wuerzburg.de
Wed Feb 25 13:45:12 EST 2004


Hi,

I am a PHD-student in Wuerzburg, Germany and just started my research
regarding chord. While analyzing the sfsnet simulator code I found this
possible bug in join.c regarding the function

void join(Node *n, int *nodeId)

the first if statement

if ((!(n1 = getNode(*nodeId))) || (n1 && n->status == ABSENT))
    // probably nodeId has been deleted in the meantime
    n1 = getNode(getRandomActiveNodeId());

checks whether node n is ABSENT. You probably wanted to check whether node
n1 is ABSENT, since node n is the node that wants to join via node n1. 

In 

Node *newNode(int id)

n->status should probably be initialized as well.

kind regards

Andy
_______________________________________________________
        
Dipl.-Inform. Andreas Binzenhoefer
Department of Distributed Systems (Informatik III)
Insitute of Computer Science, University of Wuerzburg
Am Hubland, 97074 Wuerzburg, Germany

binzenhoefer at informatik.uni-wuerzburg.de
Tel: +49 931 888-6652
Fax: +49 931 888-6632
 



More information about the chord mailing list