aboutsummaryrefslogtreecommitdiff
path: root/src/consensus/consensus.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-03-18 11:49:52 +0000
committerChristian Grothoff <christian@grothoff.org>2013-03-18 11:49:52 +0000
commitef4bd8de47b45e808d29a8f5ee3d1c4f15c96353 (patch)
treeb496042c0e2a73378cc4e73beb71299bfd32b350 /src/consensus/consensus.h
parent3ed1a0a351ef02182504649afcb18d51277e6da5 (diff)
-fix uninitialized sendto
Diffstat (limited to 'src/consensus/consensus.h')
-rw-r--r--src/consensus/consensus.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h
index 8436364b65..2c68849b98 100644
--- a/src/consensus/consensus.h
+++ b/src/consensus/consensus.h
@@ -37,9 +37,9 @@ struct GNUNET_CONSENSUS_JoinMessage
*/
struct GNUNET_MessageHeader header;
- struct GNUNET_HashCode session_id;
+ uint32_t num_peers GNUNET_PACKED;
- uint16_t num_peers;
+ struct GNUNET_HashCode session_id;
/* GNUNET_PeerIdentity[num_peers] */
};
@@ -52,15 +52,16 @@ struct GNUNET_CONSENSUS_ConcludeMessage
*/
struct GNUNET_MessageHeader header;
+
/**
- * Timeout for conclude
+ * Minimum group size required for a consensus group.
*/
- struct GNUNET_TIME_RelativeNBO timeout;
+ uint32_t min_group_size GNUNET_PACKED;
/**
- * Minimum group size required for a consensus group.
+ * Timeout for conclude
*/
- uint32_t min_group_size;
+ struct GNUNET_TIME_RelativeNBO timeout;
};
@@ -71,11 +72,11 @@ struct GNUNET_CONSENSUS_ConcludeDoneMessage
*/
struct GNUNET_MessageHeader header;
- uint32_t group_id;
+ uint32_t group_id GNUNET_PACKED;
- uint32_t num_elements;
+ uint32_t num_elements GNUNET_PACKED;
- uint16_t num_peers;
+ uint32_t num_peers GNUNET_PACKED;
/** PeerIdentity[num_peers] */
};
@@ -97,7 +98,7 @@ struct GNUNET_CONSENSUS_ElementMessage
/**
* Type: GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_NEW_ELEMENT
*/
- uint16_t element_type;
+ uint16_t element_type GNUNET_PACKED; /* FIXME: alignment? */
/* rest: element data */
};
@@ -112,7 +113,7 @@ struct GNUNET_CONSENSUS_AckMessage
/**
* Do we want to keep and propagate the element?
*/
- uint8_t keep;
+ uint8_t keep; /* FIXME: alignment!? */
/* FIXME: add message hash? */
};