- debug
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_tunnel.c
index 9bcfc8365df5942589102399e7c35bdbce1a4bb9..89c9a9db1a321c8d996f57c89ea62188cd40fb64 100644 (file)
@@ -600,11 +600,12 @@ GMT_send_queued_data (struct MeshTunnel3 *t, int fwd)
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
               "GMT_send_queued_data on tunnel %s\n",
-              GMP_2s (t->peer));
+              GMT_2s (t));
   room = GMT_get_buffer (t, fwd);
   LOG (GNUNET_ERROR_TYPE_DEBUG, "  buffer space: %u\n", room);
   for (tq = t->tq_head; NULL != tq && room > 0; tq = next)
   {
+    LOG (GNUNET_ERROR_TYPE_DEBUG, " data on channel %s\n", GMCH_2s (tq->ch));
     next = tq->next;
     room--;
     GNUNET_CONTAINER_DLL_remove (t->tq_head, t->tq_tail, tq);
@@ -613,6 +614,9 @@ GMT_send_queued_data (struct MeshTunnel3 *t, int fwd)
 
     GNUNET_free (tq);
   }
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "GMT_send_queued_data end\n",
+       GMP_2s (t->peer));
 }
 
 
@@ -1182,7 +1186,7 @@ GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
   uint64_t iv;
   uint16_t type;
 
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "Send on Tunnel %s\n", GMP_2s (t->peer));
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "GMT Send on Tunnel %s\n", GMP_2s (t->peer));
 
   iv = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_NONCE, UINT64_MAX);
   msg = (struct GNUNET_MESH_Encrypted *) cbuf;
@@ -1199,10 +1203,10 @@ GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
   type = ntohs (message->type);
   switch (type)
   {
-    case GNUNET_MESSAGE_TYPE_MESH_FWD:
-    case GNUNET_MESSAGE_TYPE_MESH_BCK:
+    case GNUNET_MESSAGE_TYPE_MESH_DATA:
     case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE:
     case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY:
+    case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK:
       msg->cid = *GMC_get_id (c);
       msg->ttl = htonl (default_ttl);
       break;