log
authorBart Polot <bart@net.in.tum.de>
Mon, 7 Apr 2014 12:00:43 +0000 (12:00 +0000)
committerBart Polot <bart@net.in.tum.de>
Mon, 7 Apr 2014 12:00:43 +0000 (12:00 +0000)
src/mesh/gnunet-service-mesh_channel.c
src/mesh/gnunet-service-mesh_connection.c
src/mesh/gnunet-service-mesh_peer.c
src/mesh/gnunet-service-mesh_tunnel.c

index b2330c5921d70c40d49d398061095aa1153f749a..20616548798cc8fd4d2ea2a42f0bf91957ab2d73 100644 (file)
@@ -733,6 +733,9 @@ ch_message_sent (void *cls,
   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:
@@ -837,8 +840,7 @@ send_ack (struct MeshChannel *ch, int fwd, int reaction)
 
   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);
@@ -2267,7 +2269,7 @@ GMCH_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
 
       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);
index 5d1a32a44e922b9acc8eab8ba61ba16e529f6c17..a85cc84ddf470d9ab3f222935632df53e920b300 100644 (file)
@@ -575,16 +575,18 @@ message_sent (void *cls,
   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);
index 089b0da95cc9041d23b8741fe73c4fd556b53365..25962b6184ebf5dcaecffc63b2e8cdefeabdc107 100644 (file)
@@ -1004,8 +1004,8 @@ GMP_queue_destroy (struct MeshPeerQueue *queue, int clear_cls, int sent)
 
   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:
@@ -1024,8 +1024,8 @@ GMP_queue_destroy (struct MeshPeerQueue *queue, int clear_cls, int sent)
 
       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);
@@ -1038,7 +1038,7 @@ GMP_queue_destroy (struct MeshPeerQueue *queue, int clear_cls, int sent)
 
   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,
index 6a86ad2d62f010d9134f41bf348434e22a96bbb3..af9dc5385c16ed38001f2d7b6545a08af88f7e6f 100644 (file)
@@ -688,13 +688,15 @@ tunnel_get_connection (struct MeshTunnel3 *t)
  * @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);
@@ -883,7 +885,7 @@ send_prebuilt_message (const struct GNUNET_MessageHeader *message,
     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;
 
@@ -2596,7 +2598,7 @@ GMT_cancel (struct MeshTunnel3Queue *q)
   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)
   {