That's of course a bug! 
Thanks a lot for pointing this out, will fix ASAP.

M.



On Apr 6, 2011, at 6:15 AM, Yuan Yin wrote:

In libpaxos-src-rev-23, there is a bug in the file proposer.c
From line 383 to 387 in the function of push_next_p1_timeout. The original code is:
void push_next_p1_timeout(pending_promise* p) {
    if(p1_pending_list_head == NULL && p1_pending_list_tail == NULL) {
    /* list is empty */
        p1_pending_list_head = p;
        p1_pending_list_tail = p;
    } else if (p1_pending_list_head == p1_pending_list_tail) {
    /* only 1 element in list */
        p = p1_pending_list_head;
        p1_pending_list_head = NULL;
        p1_pending_list_tail = NULL;
    } else {
    /* list has 1 or more elements, set a new first */
        p->next = p1_pending_list_head;
        p1_pending_list_head = p;
    }
}

It's remove a note from the list, not push it into the list. And I think the code should be:
void push_next_p1_timeout(pending_promise* p) {
    if(p1_pending_list_head == NULL && p1_pending_list_tail == NULL) {
    /* list is empty */
        p1_pending_list_head = p;
        p1_pending_list_tail = p;
    } else {
    /* list has 1 or more elements, set a new first */
        p->next = p1_pending_list_head;
        p1_pending_list_head = p;
    }
}
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev_______________________________________________
Libpaxos-general mailing list
Libpaxos-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libpaxos-general