Skip to content
Browse files

Initialize the proposed value before customized proposing.

Signed-off-by: Jiaju Zhang <jjzhang@suse.de>
  • Loading branch information...
1 parent 38b5e04 commit b7f5513f062e80299ef6247dfa766f1b13f62581 @jjzhang committed
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/paxos.c
View
3 src/paxos.c
@@ -237,12 +237,11 @@ static void proposer_propose(struct paxos_space *ps,
return;
pi->proposer->proposed = 1;
+ value = pi->proposer->proposal->value;
if (ps->p_op->propose)
ps->p_op->propose(pih, extra, ballot, value);
- value = pi->proposer->proposal->value;
hdr->valuelen = htonl(ps->valuelen);
-
message = malloc(msglen + ps->valuelen);
if (!message)
return;

0 comments on commit b7f5513

Please sign in to comment.
Something went wrong with that request. Please try again.