msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
msg.tunnel_id = htonl (t->local_tid_dest);
msg.port = htonl (t->port);
- msg.options = 0;
- msg.options |= GNUNET_YES == t->reliable ? GNUNET_MESH_OPTION_RELIABLE : 0;
- msg.options |= GNUNET_YES == t->nobuffer ? GNUNET_MESH_OPTION_NOBUFFER : 0;
- msg.options = htonl (msg.options);
+ msg.opt = 0;
+ msg.opt |= GNUNET_YES == t->reliable ? GNUNET_MESH_OPTION_RELIABLE : 0;
+ msg.opt |= GNUNET_YES == t->nobuffer ? GNUNET_MESH_OPTION_NOBUFFER : 0;
+ msg.opt = htonl (msg.opt);
GNUNET_PEER_resolve (t->id.oid, &msg.peer);
GNUNET_SERVER_notification_context_unicast (nc, t->client->handle,
&msg.header, GNUNET_NO);
delta = copy->mid - t->bck_rel->mid_recv;
mask = 0x1 << delta;
msg.futures |= mask;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ " setting bit for %u (delta %u) (%llX) -> %llX\n",
+ copy->mid, delta, mask, msg.futures);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " final futures %llX\n", msg.futures);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "add_buffer_ucast %llu\n", mid);
copy = GNUNET_malloc (sizeof (*copy) + size);
+ copy->mid = mid;
+ copy->rel = rel;
memcpy (©[1], msg, size);
// FIXME do something better than O(n), although n < 64...
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"free_sent_buffer %llu %llX\n",
mid, bitfield);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ " rel %p, copy %p\n",
+ mid, bitfield);
rel = t->fwd_rel;
for (i = 0, copy = rel->head_recv;
i < 64 && NULL != copy && 0 != bitfield;
i++, copy = next)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " trying %u\n", i);
- mask = 0x1 << i;
+ mask = 0x1LL << i;
if (0 == (bitfield & mask))
continue;
return;
}
t->port = ntohl (t_msg->port);
- tunnel_set_options (t, ntohl (t_msg->options));
+ tunnel_set_options (t, ntohl (t_msg->opt));
if (GNUNET_YES == t->reliable)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! Reliable\n");