diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-07-22 17:33:44 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-07-22 17:33:44 +0000 |
commit | 20aa75ff9f63f68f543b6dde3851f8ba26791fac (patch) | |
tree | a5e95af3d78d9a1a582846b97e53bd9c1c19e7c6 /src/mesh | |
parent | 588442ab6277a7629287548fcc0ad2a1188b0a43 (diff) | |
download | gnunet-20aa75ff9f63f68f543b6dde3851f8ba26791fac.tar.gz gnunet-20aa75ff9f63f68f543b6dde3851f8ba26791fac.zip |
- add port number to debug
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 7 | ||||
-rw-r--r-- | src/mesh/mesh_api.c | 10 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index d6e48fcb8..610b2f01e 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -3936,7 +3936,8 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
3936 | tid = ntohl (msg->tid); | 3936 | tid = ntohl (msg->tid); |
3937 | pi = (struct GNUNET_PeerIdentity *) &msg[1]; | 3937 | pi = (struct GNUNET_PeerIdentity *) &msg[1]; |
3938 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3938 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3939 | " path is for tunnel %s[%X].\n", GNUNET_i2s (pi), tid); | 3939 | " path is for tunnel %s[%X]:%u.\n", |
3940 | GNUNET_i2s (pi), tid, ntohl (msg->port)); | ||
3940 | t = tunnel_get (pi, tid); | 3941 | t = tunnel_get (pi, tid); |
3941 | if (NULL == t) /* might be a local tunnel */ | 3942 | if (NULL == t) /* might be a local tunnel */ |
3942 | { | 3943 | { |
@@ -5032,8 +5033,8 @@ handle_local_tunnel_create (void *cls, struct GNUNET_SERVER_Client *client, | |||
5032 | } | 5033 | } |
5033 | 5034 | ||
5034 | t_msg = (struct GNUNET_MESH_TunnelMessage *) message; | 5035 | t_msg = (struct GNUNET_MESH_TunnelMessage *) message; |
5035 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " towards %s\n", | 5036 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " towards %s:%u\n", |
5036 | GNUNET_i2s (&t_msg->peer)); | 5037 | GNUNET_i2s (&t_msg->peer), ntohl (t_msg->port)); |
5037 | tid = ntohl (t_msg->tunnel_id); | 5038 | tid = ntohl (t_msg->tunnel_id); |
5038 | /* Sanity check for duplicate tunnel IDs */ | 5039 | /* Sanity check for duplicate tunnel IDs */ |
5039 | if (NULL != tunnel_get_by_local_id (c, tid)) | 5040 | if (NULL != tunnel_get_by_local_id (c, tid)) |
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 82f2f1ac8..fc91801ef 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c | |||
@@ -800,9 +800,11 @@ process_tunnel_created (struct GNUNET_MESH_Handle *h, | |||
800 | { | 800 | { |
801 | struct GNUNET_MESH_Tunnel *t; | 801 | struct GNUNET_MESH_Tunnel *t; |
802 | MESH_TunnelNumber tid; | 802 | MESH_TunnelNumber tid; |
803 | uint32_t port; | ||
803 | 804 | ||
804 | tid = ntohl (msg->tunnel_id); | 805 | tid = ntohl (msg->tunnel_id); |
805 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Creating incoming tunnel %X\n", tid); | 806 | port = ntohl (msg->port); |
807 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Creating incoming tunnel %X:%u\n", tid, port); | ||
806 | if (tid < GNUNET_MESH_LOCAL_TUNNEL_ID_SERV) | 808 | if (tid < GNUNET_MESH_LOCAL_TUNNEL_ID_SERV) |
807 | { | 809 | { |
808 | GNUNET_break (0); | 810 | GNUNET_break (0); |
@@ -815,7 +817,7 @@ process_tunnel_created (struct GNUNET_MESH_Handle *h, | |||
815 | t->peer = GNUNET_PEER_intern (&msg->peer); | 817 | t->peer = GNUNET_PEER_intern (&msg->peer); |
816 | t->mesh = h; | 818 | t->mesh = h; |
817 | t->tid = tid; | 819 | t->tid = tid; |
818 | t->port = ntohl (msg->port); | 820 | t->port = port; |
819 | if (0 != (msg->opt & GNUNET_MESH_OPTION_NOBUFFER)) | 821 | if (0 != (msg->opt & GNUNET_MESH_OPTION_NOBUFFER)) |
820 | t->nobuffer = GNUNET_YES; | 822 | t->nobuffer = GNUNET_YES; |
821 | else | 823 | else |
@@ -1444,7 +1446,9 @@ GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, | |||
1444 | struct GNUNET_MESH_Tunnel *t; | 1446 | struct GNUNET_MESH_Tunnel *t; |
1445 | struct GNUNET_MESH_TunnelMessage msg; | 1447 | struct GNUNET_MESH_TunnelMessage msg; |
1446 | 1448 | ||
1447 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Creating new tunnel\n"); | 1449 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1450 | "Creating new tunnel to %s:%u\n", | ||
1451 | GNUNET_i2s (peer), port); | ||
1448 | t = create_tunnel (h, 0); | 1452 | t = create_tunnel (h, 0); |
1449 | LOG (GNUNET_ERROR_TYPE_DEBUG, " at %p\n", t); | 1453 | LOG (GNUNET_ERROR_TYPE_DEBUG, " at %p\n", t); |
1450 | LOG (GNUNET_ERROR_TYPE_DEBUG, " number %X\n", t->tid); | 1454 | LOG (GNUNET_ERROR_TYPE_DEBUG, " number %X\n", t->tid); |