GNUNET_break (0);
break;
}
- ats = (const struct GNUNET_ATS_Information*) &cim[1];
+ ats = (const struct GNUNET_ATS_Information *) &cim[1];
#if DEBUG_TRANSPORT_API
LOG (GNUNET_ERROR_TYPE_DEBUG, "Receiving `%s' message for `%4s'.\n",
"CONNECT", GNUNET_i2s (&cim->id));
}
im = (const struct InboundMessage *) msg;
ats_count = ntohl (im->ats_count);
- ats = (const struct GNUNET_ATS_Information*) &im[1];
+ ats = (const struct GNUNET_ATS_Information *) &im[1];
imm = (const struct GNUNET_MessageHeader *) &ats[ats_count];
if (ntohs (imm->size) + sizeof (struct InboundMessage) +
ats_count * sizeof (struct GNUNET_ATS_Information) != size)
{
struct GNUNET_TRANSPORT_Handle *h = cls;
struct StartMessage s;
+ uint32_t options;
if (buf == NULL)
{
GNUNET_assert (size >= sizeof (struct StartMessage));
s.header.size = htons (sizeof (struct StartMessage));
s.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_START);
- s.do_check = htonl (h->check_self);
+ options = 0;
+ if (h->check_self)
+ options |= 1;
+ if (h->rec != NULL)
+ options |= 2;
+ s.options = htonl (options);
s.self = h->self;
memcpy (buf, &s, sizeof (struct StartMessage));
GNUNET_CLIENT_receive (h->client, &demultiplexer, h,
struct GNUNET_TRANSPORT_TransmitHandle *th;
GNUNET_assert (h->reconnect_task == GNUNET_SCHEDULER_NO_TASK);
- /* Forget about all neighbours that we used to be connected to */
- GNUNET_CONTAINER_multihashmap_iterate (h->neighbours, &neighbour_delete, h);
if (NULL != h->cth)
{
GNUNET_CLIENT_notify_transmit_ready_cancel (h->cth);
GNUNET_CLIENT_disconnect (h->client, GNUNET_YES);
h->client = NULL;
}
+ /* Forget about all neighbours that we used to be connected to */
+ GNUNET_CONTAINER_multihashmap_iterate (h->neighbours, &neighbour_delete, h);
if (h->quota_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (h->quota_task);