void *pcc_cls;
struct GNUNET_TESTBED_EventInformation event;
uint64_t op_id;
+ uint64_t mask;
GNUNET_assert (sizeof (struct GNUNET_TESTBED_PeerEventMessage) ==
ntohs (msg->header.size));
GNUNET_TESTBED_remove_opc_ (opc->c, opc);
opc->state = OPC_STATE_FINISHED;
exop_insert (event.op);
- if (0 !=
- ((GNUNET_TESTBED_ET_PEER_START | GNUNET_TESTBED_ET_PEER_STOP) &
- c->event_mask))
+ mask = 1LL << GNUNET_TESTBED_ET_PEER_START;
+ mask |= 1LL << GNUNET_TESTBED_ET_PEER_STOP;
+ if (0 != (mask & c->event_mask))
{
if (NULL != c->cc)
c->cc (c->cc_cls, &event);
void *cb_cls;
struct GNUNET_TESTBED_EventInformation event;
uint64_t op_id;
+ uint64_t mask;
op_id = GNUNET_ntohll (msg->operation_id);
if (NULL == (opc = find_opc (c, op_id)))
GNUNET_TESTBED_remove_opc_ (opc->c, opc);
opc->state = OPC_STATE_FINISHED;
exop_insert (event.op);
- if (0 !=
- ((GNUNET_TESTBED_ET_CONNECT | GNUNET_TESTBED_ET_DISCONNECT) &
- c->event_mask))
+ mask = 1LL << GNUNET_TESTBED_ET_CONNECT;
+ mask |= 1LL << GNUNET_TESTBED_ET_DISCONNECT;
+ if (0 != (mask & c->event_mask))
{
if (NULL != c->cc)
c->cc (c->cc_cls, &event);
{
struct OperationContext *opc;
uint64_t op_id;
+ uint64_t mask;
struct GNUNET_TESTBED_EventInformation event;
op_id = GNUNET_ntohll (msg->operation_id);
}
opc->state = OPC_STATE_FINISHED;
GNUNET_TESTBED_remove_opc_ (opc->c, opc);
- if ((0 != (GNUNET_TESTBED_ET_OPERATION_FINISHED & c->event_mask)) &&
+ mask = 1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED;
+ if ((0 != (mask & c->event_mask)) &&
(NULL != c->cc))
{
opc->data = GNUNET_TESTBED_extract_config_ (&msg->header);
GNUNET_assert (NULL != opc);
GNUNET_break (0);
- GNUNET_free (opc);
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap32_remove (map, key, value));
+ GNUNET_free (opc);
return GNUNET_YES;
}