diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-03-18 11:49:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-03-18 11:49:52 +0000 |
commit | ef4bd8de47b45e808d29a8f5ee3d1c4f15c96353 (patch) | |
tree | b496042c0e2a73378cc4e73beb71299bfd32b350 /src/consensus/consensus_api.c | |
parent | 3ed1a0a351ef02182504649afcb18d51277e6da5 (diff) | |
download | gnunet-ef4bd8de47b45e808d29a8f5ee3d1c4f15c96353.tar.gz gnunet-ef4bd8de47b45e808d29a8f5ee3d1c4f15c96353.zip |
-fix uninitialized sendto
Diffstat (limited to 'src/consensus/consensus_api.c')
-rw-r--r-- | src/consensus/consensus_api.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/consensus/consensus_api.c b/src/consensus/consensus_api.c index 450d7b02c..19bf81c86 100644 --- a/src/consensus/consensus_api.c +++ b/src/consensus/consensus_api.c | |||
@@ -366,14 +366,11 @@ transmit_join (void *cls, size_t size, void *buf) | |||
366 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_JOIN); | 366 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_JOIN); |
367 | msg->header.size = htons (msize); | 367 | msg->header.size = htons (msize); |
368 | msg->session_id = consensus->session_id; | 368 | msg->session_id = consensus->session_id; |
369 | msg->num_peers = htons (consensus->num_peers); | 369 | msg->num_peers = htonl (consensus->num_peers); |
370 | if (0 != msg->num_peers) | 370 | memcpy(&msg[1], |
371 | memcpy(&msg[1], | 371 | consensus->peers, |
372 | consensus->peers, | 372 | consensus->num_peers * sizeof (struct GNUNET_PeerIdentity)); |
373 | consensus->num_peers * sizeof (struct GNUNET_PeerIdentity)); | ||
374 | |||
375 | send_next (consensus); | 373 | send_next (consensus); |
376 | |||
377 | GNUNET_CLIENT_receive (consensus->client, &message_handler, consensus, | 374 | GNUNET_CLIENT_receive (consensus->client, &message_handler, consensus, |
378 | GNUNET_TIME_UNIT_FOREVER_REL); | 375 | GNUNET_TIME_UNIT_FOREVER_REL); |
379 | 376 | ||