if (size < sizeof (struct ConnectInfoMessage))
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
cim = (const struct ConnectInfoMessage *) msg;
sizeof (struct ConnectInfoMessage))
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
if (NULL != n)
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
n = neighbour_add (h,
if (size != sizeof (struct DisconnectInfoMessage))
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
dim = (const struct DisconnectInfoMessage *) msg;
if (NULL == n)
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
neighbour_delete (h,
if (size != sizeof (struct SendOkMessage))
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
okm = (const struct SendOkMessage *) msg;
&okm->peer);
if (NULL == n)
{
- /* we should never get a 'SEND_OK' for a peer that we are not
+ /* We should never get a 'SEND_OK' for a peer that we are not
connected to */
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
if (bytes_physical >= bytes_msg)
sizeof (struct InboundMessage) + sizeof (struct GNUNET_MessageHeader))
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
im = (const struct InboundMessage *) msg;
if (ntohs (imm->size) + sizeof (struct InboundMessage) != size)
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
if (NULL == n)
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
if (NULL != h->rec)
if (size != sizeof (struct QuotaSetMessage))
{
GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
}
qm = (const struct QuotaSetMessage *) msg;
n = neighbour_find (h, &qm->peer);
if (NULL == n)
+ {
+ GNUNET_break (0);
+ h->reconnecting = GNUNET_YES;
+ disconnect_and_schedule_reconnect (h);
break;
+ }
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Receiving SET_QUOTA message for `%s' with quota %u\n",
GNUNET_i2s (&qm->peer),
{
struct GNUNET_TRANSPORT_TransmitHandle *th;
- GNUNET_assert (h->reconnect_task == NULL);
+ GNUNET_assert (NULL == h->reconnect_task);
if (NULL != h->cth)
{
GNUNET_CLIENT_notify_transmit_ready_cancel (h->cth);
* @param cont continuation to call when HELLO has been sent,
* tc reason #GNUNET_SCHEDULER_REASON_TIMEOUT for fail
* tc reasong #GNUNET_SCHEDULER_REASON_READ_READY for success
- * @param cls closure for continuation
+ * @param cont_cls closure for @a cont
* @return a `struct GNUNET_TRANSPORT_OfferHelloHandle` handle or NULL on failure,
- * in case of failure cont will not be called
+ * in case of failure @a cont will not be called
*
*/
struct GNUNET_TRANSPORT_OfferHelloHandle *
GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
const struct GNUNET_MessageHeader *hello,
GNUNET_SCHEDULER_TaskCallback cont,
- void *cls)
+ void *cont_cls)
{
struct GNUNET_TRANSPORT_OfferHelloHandle *ohh;
struct GNUNET_MessageHeader *msg;
ohh = GNUNET_new (struct GNUNET_TRANSPORT_OfferHelloHandle);
ohh->th = handle;
ohh->cont = cont;
- ohh->cls = cls;
+ ohh->cls = cont_cls;
ohh->msg = msg;
- ohh->tth = schedule_control_transmit (handle, size,
- &send_hello, ohh);
- GNUNET_CONTAINER_DLL_insert (handle->oh_head, handle->oh_tail, ohh);
+ ohh->tth = schedule_control_transmit (handle,
+ size,
+ &send_hello,
+ ohh);
+ GNUNET_CONTAINER_DLL_insert (handle->oh_head,
+ handle->oh_tail,
+ ohh);
return ohh;
}