From 5fc0aee1f2830a56b6da3bd957d55e3757064840 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 21 Mar 2014 18:44:20 +0000 Subject: - dht debug path --- src/mesh/mesh_path.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mesh/mesh_path.c') diff --git a/src/mesh/mesh_path.c b/src/mesh/mesh_path.c index ad1f7f4db..3fad58b68 100644 --- a/src/mesh/mesh_path.c +++ b/src/mesh/mesh_path.c @@ -182,6 +182,24 @@ path_destroy (struct MeshPeerPath *p) return GNUNET_OK; } +char * +path_2s (struct MeshPeerPath *p) +{ + char *s; + char *old; + unsigned int i; + + s = old = NULL; + for (i = 0; i < p->length; i++) + { + GNUNET_asprintf (&s, "%s %s", + old, GNUNET_i2s (GNUNET_PEER_resolve2 (p->peers[i]))); + GNUNET_free_non_null (old); + old = s; old = ""; + } + return s; +} + void path_debug (struct MeshPeerPath *p) { -- cgit v1.2.3