GCCH_hash_port (&ch->h_port,
port,
GCP_get_id (destination));
- if (0 == memcmp (&my_full_id,
- GCP_get_id (destination),
- sizeof (struct GNUNET_PeerIdentity)))
+ if (0 == GNUNET_memcmp (&my_full_id,
+ GCP_get_id (destination)))
{
struct OpenPort *op;
GNUNET_break_op (0);
return;
}
- if (0 != memcmp (&ch->port,
- port,
- sizeof (struct GNUNET_HashCode)))
+ if (0 != GNUNET_memcmp (&ch->port,
+ port))
{
/* Other peer failed to provide the right port,
refuse connection. */
ccc->client_ready = GNUNET_NO;
GSC_send_to_client (ccc->c,
env);
- ch->mid_recv.mid = htonl (1 + ntohl (ch->mid_recv.mid));
+ if (GNUNET_NO == ch->out_of_order)
+ ch->mid_recv.mid = htonl (1 + ntohl (msg->mid.mid));
+ else
+ ch->mid_recv.mid = htonl (1 + ntohl (ch->mid_recv.mid));
ch->mid_futures >>= 1;
if ( (GNUNET_YES == ch->out_of_order) &&
(GNUNET_NO == ch->reliable) )
ccc->client_ready = GNUNET_NO;
GSC_send_to_client (ccc->c,
next_msg->env);
- ch->mid_recv.mid = htonl (1 + ntohl (ch->mid_recv.mid));
+ ch->mid_recv.mid = htonl (1 + ntohl (next_msg->mid.mid));
ch->mid_futures >>= 1;
send_channel_data_ack (ch);
GNUNET_CONTAINER_DLL_remove (ccc->head_recv,
(NULL != cti) )
{
GCC_ack_observed (cti);
- if (0 == memcmp (cti,
- &crm->connection_taken,
- sizeof (struct GNUNET_CADET_ConnectionTunnelIdentifier)))
+ if (0 == GNUNET_memcmp (cti,
+ &crm->connection_taken))
{
GCC_latency_observed (cti,
GNUNET_TIME_absolute_get_duration (crm->first_transmission_time));