// const struct GNUNET_MessageHeader *message)
// {
// struct GNUNET_MESH_LocalMonitor *msg;
-//
+//
// GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Get Channels messasge received\n");
-//
+//
// if (NULL == h->channels_cb)
// {
// GNUNET_log (GNUNET_ERROR_TYPE_ERROR, " ignored\n");
// return;
// }
-//
+//
// msg = (struct GNUNET_MESH_LocalMonitor *) message;
// if (ntohs (message->size) !=
// (sizeof (struct GNUNET_MESH_LocalMonitor) +
// {
// struct GNUNET_MESH_LocalMonitor *msg;
// size_t esize;
-//
+//
// GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Show Channel messasge received\n");
-//
+//
// if (NULL == h->channel_cb)
// {
// GNUNET_log (GNUNET_ERROR_TYPE_ERROR, " ignored\n");
// return;
// }
-//
+//
// /* Verify message sanity */
// msg = (struct GNUNET_MESH_LocalMonitor *) message;
// esize = sizeof (struct GNUNET_MESH_LocalMonitor);
// "Show channel message: size %hu - expected %u\n",
// ntohs (message->size),
// esize);
-//
+//
// h->channel_cb (h->channel_cls, NULL, NULL);
// h->channel_cb = NULL;
// h->channel_cls = NULL;
-//
+//
// return;
// }
-//
+//
// h->channel_cb (h->channel_cls,
// &msg->destination,
// &msg->owner);
}
}
+
void
GNUNET_MESH_receive_done (struct GNUNET_MESH_Channel *channel)
{
send_packet (h, &msg, NULL);
h->channels_cb = callback;
h->channels_cls = callback_cls;
-
- return;
}
send_packet (h, &msg.header, NULL);
h->channel_cb = callback;
h->channel_cls = callback_cls;
-
- return;
}
GNUNET_assert (msize <= size);
memcpy (buf, msg, msize);
GNUNET_MQ_impl_send_continue (mq);
+ GNUNET_MQ_impl_send_commit (mq);
return msize;
}
struct MeshMQState *state = impl_state;
GNUNET_assert (NULL == state->th);
- GNUNET_MQ_impl_send_commit (mq);
state->th =
GNUNET_MESH_notify_transmit_ready (state->channel,
/* FIXME: add option for corking */