reconnect (struct GNUNET_CORE_Handle *h)
{
if (h->client_notifications != NULL)
- GNUNET_CLIENT_disconnect (h->client_notifications);
+ GNUNET_CLIENT_disconnect (h->client_notifications, GNUNET_NO);
h->currently_down = GNUNET_YES;
h->client_notifications = GNUNET_CLIENT_connect (h->sched, "core", h->cfg);
if (h->client_notifications == NULL)
if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task);
if (handle->client_notifications != NULL)
- GNUNET_CLIENT_disconnect (handle->client_notifications);
+ GNUNET_CLIENT_disconnect (handle->client_notifications, GNUNET_NO);
GNUNET_free_non_null (handle->solicit_buffer);
GNUNET_free (handle);
}
return 0;
}
GNUNET_assert (dt >= sizeof (struct GNUNET_MessageHeader));
+ if (dt + sizeof (struct SendMessage) >= GNUNET_SERVER_MAX_MESSAGE_SIZE)
+ {
+ GNUNET_break (0);
+ return 0;
+ }
sm->header.size = htons (dt + sizeof (struct SendMessage));
GNUNET_assert (dt + sizeof (struct SendMessage) <= size);
return dt + sizeof (struct SendMessage);