aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/mesh_path.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/mesh_path.c')
-rw-r--r--src/mesh/mesh_path.c18
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
185char *
186path_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
185void 203void
186path_debug (struct MeshPeerPath *p) 204path_debug (struct MeshPeerPath *p)
187{ 205{