struct MeshReliableMessage *copy = chq->copy;
struct MeshChannelReliability *rel;
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "channel message sent callback %s\n",
+ GM_m2s (chq->type));
+
switch (chq->type)
{
case GNUNET_MESSAGE_TYPE_MESH_DATA:
msg.header.size = htons (sizeof (msg));
msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK);
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- " sending channel %s ack for channel %s\n",
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " sending channel %s ack for channel %s\n",
GM_f2s (fwd), GMCH_2s (ch));
msg.chid = htonl (ch->gid);
payload = (struct GNUNET_MESH_Data *) message;
LOG (GNUNET_ERROR_TYPE_INFO, "=> %s %u\n",
- GM_m2s (type), ntohl(payload->mid));
+ GM_m2s (type), ntohl (payload->mid));
if (GNUNET_YES == ch->reliable)
{
chq = GNUNET_new (struct MeshChannelQueue);
double usecsperbyte;
int forced;
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "connection message_sent\n");
+
fc = fwd ? &c->fwd_fc : &c->bck_fc;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "! %ssent %s %s\n",
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " %ssent %s %s\n",
sent ? "" : "not ", GM_f2s (fwd), GM_m2s (type));
- LOG (GNUNET_ERROR_TYPE_DEBUG, "! C_P- %p %u\n", c, c->pending_messages);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " C_P- %p %u\n", c, c->pending_messages);
if (NULL != q)
{
forced = q->forced;
if (NULL != q->cont)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "! calling cont\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " calling cont\n");
q->cont (q->cont_cls, c, q, type, fwd, size);
}
GNUNET_free (q);
if (GNUNET_YES == clear_cls)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "# queue destroy type %s\n",
- GM_m2s (queue->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "queue destroy type %s\n",
+ GM_m2s (queue->type));
switch (queue->type)
{
case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY:
default:
GNUNET_break (0);
- LOG (GNUNET_ERROR_TYPE_ERROR, "# type %s unknown!\n",
- GM_m2s (queue->type));
+ LOG (GNUNET_ERROR_TYPE_ERROR, " type %s unknown!\n",
+ GM_m2s (queue->type));
}
}
GNUNET_CONTAINER_DLL_remove (peer->queue_head, peer->queue_tail, queue);
if (NULL != queue->callback)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "# Calling callback\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " calling callback\n");
queue->callback (queue->callback_cls,
queue->c, sent, queue->type,
queue->fwd, queue->size,
* @param size Size of the message.
*/
static void
-message_sent (void *cls,
+tun_message_sent (void *cls,
struct MeshConnection *c,
struct MeshConnectionQueue *q,
uint16_t type, int fwd, size_t size)
{
struct MeshTunnel3Queue *qt = cls;
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "tun_message_sent\n");
+
GNUNET_assert (NULL != qt->cont);
qt->cont (qt->cont_cls, GMC_get_tunnel (c), qt, type, size);
GNUNET_free (qt);
tq->tqd = NULL;
}
tq->cq = GMC_send_prebuilt_message (&msg->header, c, fwd, force,
- &message_sent, tq);
+ &tun_message_sent, tq);
tq->cont = cont;
tq->cont_cls = cont_cls;
if (NULL != q->cq)
{
GMC_cancel (q->cq);
- /* message_sent() will be called and free q */
+ /* tun_message_sent() will be called and free q */
}
else if (NULL != q->tqd)
{