From: Bart Polot Date: Fri, 27 Jul 2012 14:07:36 +0000 (+0000) Subject: - more debug msgs X-Git-Tag: initial-import-from-subversion-38251~12303 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=804a827b19664dfef9dcf88faa2d17f740820209;p=oweals%2Fgnunet.git - more debug msgs --- diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 858b87bbd..efa2ad945 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -1879,6 +1879,7 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg, struct GNUNET_MESH_TunnelNotification tmsg; struct GNUNET_HashCode hash; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " sending tunnel create\n"); tmsg.header.size = htons (sizeof (tmsg)); tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE); GNUNET_PEER_resolve (t->id.oid, &tmsg.peer); @@ -1943,14 +1944,21 @@ send_client_tunnel_ack (struct MeshClient *c, struct MeshTunnel *t) struct GNUNET_MESH_LocalAck msg; uint32_t ack; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Sending client ACK on tunnel %X\n", + t->local_tid); if (NULL == c) return; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " to client %u\n", c->id); + ack = tunnel_get_ack (t); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " ack %u\n", ack); if (t->last_ack == ack) return; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " sending!\n"); t->last_ack = ack; msg.header.size = htons (sizeof (msg)); msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_ACK); diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 1592263e7..0220df95a 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -1134,7 +1134,7 @@ msg_received (void *cls, const struct GNUNET_MessageHeader *msg) if (msg == NULL) { - LOG (GNUNET_ERROR_TYPE_DEBUG, "Received NULL msg\n"); + LOG (GNUNET_ERROR_TYPE_DEBUG, "Received NULL msg on %p\n", h); reconnect (h); return; } @@ -1205,7 +1205,7 @@ send_callback (void *cls, size_t size, void *buf) LOG (GNUNET_ERROR_TYPE_DEBUG, "Send packet() Buffer %u\n", size); if ((0 == size) || (NULL == buf)) { - LOG (GNUNET_ERROR_TYPE_DEBUG, "Received NULL send callback\n"); + LOG (GNUNET_ERROR_TYPE_DEBUG, "Received NULL send callback on %p\n", h); reconnect (h); h->th = NULL; return 0; @@ -1431,6 +1431,7 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, LOG (GNUNET_ERROR_TYPE_DEBUG, "GNUNET_MESH_connect()\n"); h = GNUNET_malloc (sizeof (struct GNUNET_MESH_Handle)); + LOG (GNUNET_ERROR_TYPE_DEBUG, " addr %p\n", h); h->cfg = cfg; h->new_tunnel = new_tunnel; h->cleaner = cleaner; @@ -1941,6 +1942,7 @@ GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork, LOG (GNUNET_ERROR_TYPE_DEBUG, " target %s\n", GNUNET_i2s (target)); else LOG (GNUNET_ERROR_TYPE_DEBUG, " target multicast\n"); + LOG (GNUNET_ERROR_TYPE_DEBUG, " payload size %u\n", notify_size); GNUNET_assert (NULL != notify); GNUNET_assert (0 == tunnel->packet_size); // Only one data packet allowed th = GNUNET_malloc (sizeof (struct GNUNET_MESH_TransmitHandle)); @@ -1954,11 +1956,13 @@ GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork, else overhead = sizeof (struct GNUNET_MESH_Unicast); tunnel->packet_size = th->size = notify_size + overhead; + LOG (GNUNET_ERROR_TYPE_DEBUG, " total size %u\n", th->size); th->notify = notify; th->notify_cls = notify_cls; add_to_queue (tunnel->mesh, th); if (NULL != tunnel->mesh->th) return th; + LOG (GNUNET_ERROR_TYPE_DEBUG, " call notify tmt rdy\n"); tunnel->mesh->th = GNUNET_CLIENT_notify_transmit_ready (tunnel->mesh->client, th->size, GNUNET_TIME_UNIT_FOREVER_REL,