diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-03-21 18:44:20 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-03-21 18:44:20 +0000 |
commit | 5fc0aee1f2830a56b6da3bd957d55e3757064840 (patch) | |
tree | 912ebe4b05534221592a0e6054b4dac6bf1083be /src/mesh/mesh_path.c | |
parent | df06904b49f8ef1ad4db2494ec6c723f2886ebc6 (diff) | |
download | gnunet-5fc0aee1f2830a56b6da3bd957d55e3757064840.tar.gz gnunet-5fc0aee1f2830a56b6da3bd957d55e3757064840.zip |
- dht debug path
Diffstat (limited to 'src/mesh/mesh_path.c')
-rw-r--r-- | src/mesh/mesh_path.c | 18 |
1 files changed, 18 insertions, 0 deletions
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) | |||
182 | return GNUNET_OK; | 182 | return GNUNET_OK; |
183 | } | 183 | } |
184 | 184 | ||
185 | char * | ||
186 | path_2s (struct MeshPeerPath *p) | ||
187 | { | ||
188 | char *s; | ||
189 | char *old; | ||
190 | unsigned int i; | ||
191 | |||
192 | s = old = NULL; | ||
193 | for (i = 0; i < p->length; i++) | ||
194 | { | ||
195 | GNUNET_asprintf (&s, "%s %s", | ||
196 | old, GNUNET_i2s (GNUNET_PEER_resolve2 (p->peers[i]))); | ||
197 | GNUNET_free_non_null (old); | ||
198 | old = s; old = ""; | ||
199 | } | ||
200 | return s; | ||
201 | } | ||
202 | |||
185 | void | 203 | void |
186 | path_debug (struct MeshPeerPath *p) | 204 | path_debug (struct MeshPeerPath *p) |
187 | { | 205 | { |