aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-01-17 19:45:04 +0000
committerBart Polot <bart@net.in.tum.de>2012-01-17 19:45:04 +0000
commit19a39da4e28c3190e9c99525001cc95af0ba64dd (patch)
tree7603beaff6034c57c640b645d6e89600db2c3037 /src/mesh
parenta1d0953d72d75d3fa53a308dd19e1e1bec371b53 (diff)
downloadgnunet-19a39da4e28c3190e9c99525001cc95af0ba64dd.tar.gz
gnunet-19a39da4e28c3190e9c99525001cc95af0ba64dd.zip
Added debug info for #2071
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/mesh_api.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index eda2c0db5..f0492472a 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -759,7 +759,6 @@ process_tunnel_created (struct GNUNET_MESH_Handle *h,
759 const struct GNUNET_MESH_TunnelNotification *msg) 759 const struct GNUNET_MESH_TunnelNotification *msg)
760{ 760{
761 struct GNUNET_MESH_Tunnel *t; 761 struct GNUNET_MESH_Tunnel *t;
762 struct GNUNET_ATS_Information atsi;
763 MESH_TunnelNumber tid; 762 MESH_TunnelNumber tid;
764 763
765 tid = ntohl (msg->tunnel_id); 764 tid = ntohl (msg->tunnel_id);
@@ -780,10 +779,16 @@ process_tunnel_created (struct GNUNET_MESH_Handle *h,
780 t->tid = tid; 779 t->tid = tid;
781 if (NULL != h->new_tunnel) 780 if (NULL != h->new_tunnel)
782 { 781 {
782 struct GNUNET_ATS_Information atsi;
783
783 atsi.type = 0; 784 atsi.type = 0;
784 atsi.value = 0; 785 atsi.value = 0;
785 t->ctx = h->new_tunnel (h->cls, t, &msg->peer, &atsi); 786 t->ctx = h->new_tunnel (h->cls, t, &msg->peer, &atsi);
786 } 787 }
788#if MESH_API_DEBUG
789 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: new incoming tunnel %u\n",
790 t->tid);
791#endif
787 return; 792 return;
788} 793}
789 794
@@ -812,7 +817,9 @@ process_tunnel_destroy (struct GNUNET_MESH_Handle *h,
812 { 817 {
813 GNUNET_break (0); 818 GNUNET_break (0);
814 } 819 }
815 820#if MESH_API_DEBUG
821 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: tunnel %u destroyed\n", t->tid);
822#endif
816 destroy_tunnel (t); 823 destroy_tunnel (t);
817 return; 824 return;
818} 825}
@@ -911,6 +918,13 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
911 case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: 918 case GNUNET_MESSAGE_TYPE_MESH_MULTICAST:
912 mcast = (struct GNUNET_MESH_Multicast *) message; 919 mcast = (struct GNUNET_MESH_Multicast *) message;
913 t = retrieve_tunnel (h, ntohl (mcast->tid)); 920 t = retrieve_tunnel (h, ntohl (mcast->tid));
921#if MESH_API_DEBUG // FIXME debug for #2071
922 if (NULL == t)
923 {
924 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "mesh: tunnel %u unknown\n",
925 ntohl (mcast->tid));
926 }
927#endif
914 payload = (struct GNUNET_MessageHeader *) &mcast[1]; 928 payload = (struct GNUNET_MessageHeader *) &mcast[1];
915 peer = &mcast->oid; 929 peer = &mcast->oid;
916 break; 930 break;