aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh_peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/gnunet-service-mesh_peer.c')
-rw-r--r--src/mesh/gnunet-service-mesh_peer.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c
index 6c8963864..05fb90f39 100644
--- a/src/mesh/gnunet-service-mesh_peer.c
+++ b/src/mesh/gnunet-service-mesh_peer.c
@@ -1541,6 +1541,34 @@ GMP_add_connection (struct MeshPeer *peer,
1541 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); 1541 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
1542} 1542}
1543 1543
1544
1545int
1546GMP_remove_connection (struct MeshPeer *peer,
1547 const struct MeshConnection *c)
1548{
1549 if (NULL == peer || NULL == peer->connections)
1550 {
1551 GNUNET_break (0);
1552 return GNUNET_SYSERR;
1553 }
1554 return GNUNET_CONTAINER_multihashmap_remove (peer->connections,
1555 GMC_get_id (c),
1556 c);
1557}
1558
1559/**
1560 * Get the Full ID of a peer.
1561 *
1562 * @param peer Peer to get from.
1563 *
1564 * @return Full ID of peer.
1565 */
1566struct GNUNET_PeerIdentity *
1567GMP_get_id (const struct MeshPeer *peer)
1568{
1569 return GNUNET_PEER_resolve2 (peer->id);
1570}
1571
1544/** 1572/**
1545 * Get the static string for a peer ID. 1573 * Get the static string for a peer ID.
1546 * 1574 *