struct GNUNET_CONSENSUS_RoundContextMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ROUND_CONTEXT
+ * Type: #GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ROUND_CONTEXT
*/
struct GNUNET_MessageHeader header;
/**
* A value from 'enum PhaseKind'.
*/
- uint16_t kind;
+ uint16_t kind GNUNET_PACKED;
/**
* Number of the first peer
* in canonical order.
*/
- int16_t peer1;
+ int16_t peer1 GNUNET_PACKED;
/**
* Number of the second peer in canonical order.
*/
- int16_t peer2;
+ int16_t peer2 GNUNET_PACKED;
/**
* Repetition of the gradecast phase.
*/
- int16_t repetition;
+ int16_t repetition GNUNET_PACKED;
/**
* Leader in the gradecast phase.
*
* Can be different from both peer1 and peer2.
*/
- int16_t leader;
+ int16_t leader GNUNET_PACKED;
/**
* Non-zero if this set reconciliation
*
* Ignored for set operations that are not within gradecasts.
*/
- uint16_t is_contested;
+ uint16_t is_contested GNUNET_PACKED;
};
* Payload element_type, only valid
* if this is not a marker element.
*/
- uint16_t payload_type;
+ uint16_t payload_type GNUNET_PACKED;
/**
* Is this a marker element?
*/
- uint8_t marker;
+ uint8_t marker GNUNET_PACKED;
/* rest: element data */
};
if (PHASE_KIND_ALL_TO_ALL_2 == task->key.kind)
{
struct GNUNET_SET_Element element;
- struct ConsensusSizeElement cse = { 0 };
+ struct ConsensusSizeElement cse = {
+ .size = 0,
+ .sender_index = 0
+ };
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "inserting size marker\n");
cse.ce.marker = CONSENSUS_MARKER_SIZE;
cse.size = GNUNET_htonll (session->first_size);
for (i = 0; i < evil.num; i++)
{
struct GNUNET_SET_Element element;
- struct ConsensusStuffedElement se = { 0 };
+ struct ConsensusStuffedElement se = {
+ .ce.payload_type = 0,
+ .ce.marker = 0,
+ };
element.data = &se;
element.size = sizeof (struct ConsensusStuffedElement);
element.element_type = GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT;
if (task->key.peer1 == session->local_peer_idx)
{
- struct GNUNET_CONSENSUS_RoundContextMessage rcm = { 0 };
+ struct GNUNET_CONSENSUS_RoundContextMessage rcm;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"P%u: Looking up set {%s} to run remote union\n",
rcm.peer2 = htons (task->key.peer2);
rcm.leader = htons (task->key.leader);
rcm.repetition = htons (task->key.repetition);
+ rcm.is_contested = htons (0);
GNUNET_assert (NULL == setop->op);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: initiating set op with P%u, our set is %s\n",
GNUNET_SET_OPERATION_UNION);
neighbor->set_op = GNUNET_SET_accept (request,
GNUNET_SET_RESULT_ADDED,
- (struct GNUNET_SET_Option[]) { 0 },
+ (struct GNUNET_SET_Option[]) {{ 0 }},
&handle_set_union_result,
neighbor);
neighbor->consensus_insertion_offset = 0;
&neighbor->real_session_id,
NULL,
GNUNET_SET_RESULT_ADDED,
- (struct GNUNET_SET_Option[]) { 0 },
+ (struct GNUNET_SET_Option[]) {{ 0 }},
&handle_set_union_result,
neighbor);
neighbor->consensus_insertion_offset = 0;