From 0b2fd8bc93e74fb4094e0e94ad7344da99b81874 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 8 Oct 2013 09:36:57 +0000 Subject: [PATCH] - MOve peer2s to peer section --- src/mesh/gnunet-service-mesh-enc.c | 16 ---------------- src/mesh/gnunet-service-mesh_peer.c | 15 +++++++++++++++ src/mesh/gnunet-service-mesh_peer.h | 11 +++++++++++ 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c index 45103945f..d67a82802 100644 --- a/src/mesh/gnunet-service-mesh-enc.c +++ b/src/mesh/gnunet-service-mesh-enc.c @@ -109,22 +109,6 @@ static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; /******************************************************************************/ -/** - * Get the static string for a peer ID. - * - * @param peer Peer. - * - * @return Static string for it's ID. - */ -static const char * -peer2s (const struct MeshPeer *peer) -{ - if (NULL == peer) - return "(NULL)"; - return GNUNET_i2s (GNUNET_PEER_resolve2 (peer->id)); -} - - /** * Send an ACK on the appropriate connection/channel, depending on diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index 553e84095..43c6259e3 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c @@ -1260,4 +1260,19 @@ GMP_connect (struct MeshPeer *peer) if (MESH_TUNNEL_NEW == t->state) tunnel_change_state (t, MESH_TUNNEL_SEARCHING); } +} + +/** + * Get the static string for a peer ID. + * + * @param peer Peer. + * + * @return Static string for it's ID. + */ +const char * +GMP_2s (const struct MeshPeer *peer) +{ + if (NULL == peer) + return "(NULL)"; + return GNUNET_i2s (GNUNET_PEER_resolve2 (peer->id)); } \ No newline at end of file diff --git a/src/mesh/gnunet-service-mesh_peer.h b/src/mesh/gnunet-service-mesh_peer.h index ca885d1b7..7945a01f5 100644 --- a/src/mesh/gnunet-service-mesh_peer.h +++ b/src/mesh/gnunet-service-mesh_peer.h @@ -92,6 +92,17 @@ void GMP_queue_destroy (struct MeshPeerQueue *queue, int clear_cls); +/** + * Get the static string for a peer ID. + * + * @param peer Peer. + * + * @return Static string for it's ID. + */ +const char * +GMP_2s (const struct MeshPeer *peer); + + #if 0 /* keep Emacsens' auto-indent happy */ { #endif -- 2.25.1