aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r--src/mesh/gnunet-service-mesh.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 26984836e..3c3cd3d87 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -639,7 +639,7 @@ unsigned int next_client_id;
639 * GNUNET_NO if not. 639 * GNUNET_NO if not.
640 */ 640 */
641static int 641static int
642announce_application (void *cls, const GNUNET_HashCode * key, void *value) 642announce_application (void *cls, const struct GNUNET_HashCode * key, void *value)
643{ 643{
644 /* FIXME are hashes in multihash map equal on all aquitectures? */ 644 /* FIXME are hashes in multihash map equal on all aquitectures? */
645 /* FIXME: keep return value of 'put' to possibly cancel!? */ 645 /* FIXME: keep return value of 'put' to possibly cancel!? */
@@ -733,7 +733,7 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
733 */ 733 */
734static void 734static void
735dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, 735dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
736 const GNUNET_HashCode * key, 736 const struct GNUNET_HashCode * key,
737 const struct GNUNET_PeerIdentity *get_path, 737 const struct GNUNET_PeerIdentity *get_path,
738 unsigned int get_path_length, 738 unsigned int get_path_length,
739 const struct GNUNET_PeerIdentity *put_path, 739 const struct GNUNET_PeerIdentity *put_path,
@@ -818,7 +818,7 @@ client_get (struct GNUNET_SERVER_Client *client)
818static int 818static int
819client_is_subscribed (uint16_t message_type, struct MeshClient *c) 819client_is_subscribed (uint16_t message_type, struct MeshClient *c)
820{ 820{
821 GNUNET_HashCode hc; 821 struct GNUNET_HashCode hc;
822 822
823 GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc); 823 GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc);
824 return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc); 824 return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc);
@@ -907,7 +907,7 @@ client_knows_tunnel (struct MeshClient *c, struct MeshTunnel *t)
907static void 907static void
908client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t) 908client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
909{ 909{
910 GNUNET_HashCode hash; 910 struct GNUNET_HashCode hash;
911 911
912 GNUNET_CRYPTO_hash(&t->local_tid_dest, sizeof (MESH_TunnelNumber), &hash); 912 GNUNET_CRYPTO_hash(&t->local_tid_dest, sizeof (MESH_TunnelNumber), &hash);
913 GNUNET_break (GNUNET_YES == 913 GNUNET_break (GNUNET_YES ==
@@ -931,7 +931,7 @@ client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
931static void 931static void
932client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t) 932client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t)
933{ 933{
934 GNUNET_HashCode hash; 934 struct GNUNET_HashCode hash;
935 935
936 if (c == t->owner) 936 if (c == t->owner)
937 { 937 {
@@ -1031,7 +1031,7 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg,
1031 { 1031 {
1032 /* This client doesn't know the tunnel */ 1032 /* This client doesn't know the tunnel */
1033 struct GNUNET_MESH_TunnelNotification tmsg; 1033 struct GNUNET_MESH_TunnelNotification tmsg;
1034 GNUNET_HashCode hash; 1034 struct GNUNET_HashCode hash;
1035 1035
1036 tmsg.header.size = htons (sizeof (tmsg)); 1036 tmsg.header.size = htons (sizeof (tmsg));
1037 tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE); 1037 tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
@@ -1232,7 +1232,7 @@ peer_info_get_short (const GNUNET_PEER_Id peer)
1232 * @return always GNUNET_YES, to keep iterating 1232 * @return always GNUNET_YES, to keep iterating
1233 */ 1233 */
1234static int 1234static int
1235peer_info_delete_tunnel (void *cls, const GNUNET_HashCode * key, void *value) 1235peer_info_delete_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
1236{ 1236{
1237 struct MeshTunnel *t = cls; 1237 struct MeshTunnel *t = cls;
1238 struct MeshPeerInfo *peer = value; 1238 struct MeshPeerInfo *peer = value;
@@ -1476,7 +1476,7 @@ peer_info_connect (struct MeshPeerInfo *peer, struct MeshTunnel *t)
1476 } 1476 }
1477 else 1477 else
1478 { 1478 {
1479 GNUNET_HashCode hash; 1479 struct GNUNET_HashCode hash;
1480 1480
1481 path_destroy (p); 1481 path_destroy (p);
1482 send_client_peer_connected (t, myid); 1482 send_client_peer_connected (t, myid);
@@ -1913,7 +1913,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
1913static struct MeshTunnel * 1913static struct MeshTunnel *
1914tunnel_get_incoming (MESH_TunnelNumber tid) 1914tunnel_get_incoming (MESH_TunnelNumber tid)
1915{ 1915{
1916 GNUNET_HashCode hash; 1916 struct GNUNET_HashCode hash;
1917 1917
1918 GNUNET_assert (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV); 1918 GNUNET_assert (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV);
1919 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash); 1919 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
@@ -1938,7 +1938,7 @@ tunnel_get_by_local_id (struct MeshClient *c, MESH_TunnelNumber tid)
1938 } 1938 }
1939 else 1939 else
1940 { 1940 {
1941 GNUNET_HashCode hash; 1941 struct GNUNET_HashCode hash;
1942 1942
1943 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash); 1943 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
1944 return GNUNET_CONTAINER_multihashmap_get (c->own_tunnels, &hash); 1944 return GNUNET_CONTAINER_multihashmap_get (c->own_tunnels, &hash);
@@ -1958,7 +1958,7 @@ static struct MeshTunnel *
1958tunnel_get_by_pi (GNUNET_PEER_Id pi, MESH_TunnelNumber tid) 1958tunnel_get_by_pi (GNUNET_PEER_Id pi, MESH_TunnelNumber tid)
1959{ 1959{
1960 struct MESH_TunnelID id; 1960 struct MESH_TunnelID id;
1961 GNUNET_HashCode hash; 1961 struct GNUNET_HashCode hash;
1962 1962
1963 id.oid = pi; 1963 id.oid = pi;
1964 id.tid = tid; 1964 id.tid = tid;
@@ -2334,7 +2334,7 @@ static int
2334tunnel_destroy (struct MeshTunnel *t) 2334tunnel_destroy (struct MeshTunnel *t)
2335{ 2335{
2336 struct MeshClient *c; 2336 struct MeshClient *c;
2337 GNUNET_HashCode hash; 2337 struct GNUNET_HashCode hash;
2338 unsigned int i; 2338 unsigned int i;
2339 int r; 2339 int r;
2340 2340
@@ -2498,7 +2498,7 @@ tunnel_delete_peer (struct MeshTunnel *t, GNUNET_PEER_Id peer)
2498 * @return GNUNET_OK on success 2498 * @return GNUNET_OK on success
2499 */ 2499 */
2500static int 2500static int
2501tunnel_destroy_iterator (void *cls, const GNUNET_HashCode * key, void *value) 2501tunnel_destroy_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
2502{ 2502{
2503 struct MeshTunnel *t = value; 2503 struct MeshTunnel *t = value;
2504 struct MeshClient *c = cls; 2504 struct MeshClient *c = cls;
@@ -2916,7 +2916,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
2916 MESH_TunnelNumber tid; 2916 MESH_TunnelNumber tid;
2917 struct GNUNET_MESH_ManipulatePath *msg; 2917 struct GNUNET_MESH_ManipulatePath *msg;
2918 struct GNUNET_PeerIdentity *pi; 2918 struct GNUNET_PeerIdentity *pi;
2919 GNUNET_HashCode hash; 2919 struct GNUNET_HashCode hash;
2920 struct MeshPeerPath *path; 2920 struct MeshPeerPath *path;
2921 struct MeshPeerInfo *dest_peer_info; 2921 struct MeshPeerInfo *dest_peer_info;
2922 struct MeshPeerInfo *orig_peer_info; 2922 struct MeshPeerInfo *orig_peer_info;
@@ -3574,7 +3574,7 @@ static struct GNUNET_CORE_MessageHandler core_handlers[] = {
3574 * @return GNUNET_OK on success 3574 * @return GNUNET_OK on success
3575 */ 3575 */
3576static int 3576static int
3577deregister_app (void *cls, const GNUNET_HashCode * key, void *value) 3577deregister_app (void *cls, const struct GNUNET_HashCode * key, void *value)
3578{ 3578{
3579 GNUNET_break (GNUNET_YES == 3579 GNUNET_break (GNUNET_YES ==
3580 GNUNET_CONTAINER_multihashmap_remove (applications, key, 3580 GNUNET_CONTAINER_multihashmap_remove (applications, key,
@@ -3689,7 +3689,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
3689 */ 3689 */
3690static void 3690static void
3691dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, 3691dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3692 const GNUNET_HashCode * key, 3692 const struct GNUNET_HashCode * key,
3693 const struct GNUNET_PeerIdentity *get_path, 3693 const struct GNUNET_PeerIdentity *get_path,
3694 unsigned int get_path_length, 3694 unsigned int get_path_length,
3695 const struct GNUNET_PeerIdentity *put_path, 3695 const struct GNUNET_PeerIdentity *put_path,
@@ -3737,7 +3737,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3737 */ 3737 */
3738static void 3738static void
3739dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp, 3739dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3740 const GNUNET_HashCode * key, 3740 const struct GNUNET_HashCode * key,
3741 const struct GNUNET_PeerIdentity *get_path, 3741 const struct GNUNET_PeerIdentity *get_path,
3742 unsigned int get_path_length, 3742 unsigned int get_path_length,
3743 const struct GNUNET_PeerIdentity *put_path, 3743 const struct GNUNET_PeerIdentity *put_path,
@@ -3888,7 +3888,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
3888 if (napps > 0) 3888 if (napps > 0)
3889 { 3889 {
3890 GNUNET_MESH_ApplicationType at; 3890 GNUNET_MESH_ApplicationType at;
3891 GNUNET_HashCode hc; 3891 struct GNUNET_HashCode hc;
3892 3892
3893 c->apps = GNUNET_CONTAINER_multihashmap_create (napps); 3893 c->apps = GNUNET_CONTAINER_multihashmap_create (napps);
3894 for (i = 0; i < napps; i++) 3894 for (i = 0; i < napps; i++)
@@ -3911,7 +3911,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
3911 if (ntypes > 0) 3911 if (ntypes > 0)
3912 { 3912 {
3913 uint16_t u16; 3913 uint16_t u16;
3914 GNUNET_HashCode hc; 3914 struct GNUNET_HashCode hc;
3915 3915
3916 t = (uint16_t *) & a[napps]; 3916 t = (uint16_t *) & a[napps];
3917 c->types = GNUNET_CONTAINER_multihashmap_create (ntypes); 3917 c->types = GNUNET_CONTAINER_multihashmap_create (ntypes);
@@ -4238,7 +4238,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client,
4238 struct GNUNET_MESH_ConnectPeerByType *connect_msg; 4238 struct GNUNET_MESH_ConnectPeerByType *connect_msg;
4239 struct MeshClient *c; 4239 struct MeshClient *c;
4240 struct MeshTunnel *t; 4240 struct MeshTunnel *t;
4241 GNUNET_HashCode hash; 4241 struct GNUNET_HashCode hash;
4242 MESH_TunnelNumber tid; 4242 MESH_TunnelNumber tid;
4243 4243
4244 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got connect by type request\n"); 4244 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got connect by type request\n");
@@ -4717,7 +4717,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
4717 * GNUNET_NO if not. 4717 * GNUNET_NO if not.
4718 */ 4718 */
4719static int 4719static int
4720shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value) 4720shutdown_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
4721{ 4721{
4722 struct MeshTunnel *t = value; 4722 struct MeshTunnel *t = value;
4723 4723
@@ -4735,7 +4735,7 @@ shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value)
4735 * GNUNET_NO if not. 4735 * GNUNET_NO if not.
4736 */ 4736 */
4737static int 4737static int
4738shutdown_peer (void *cls, const GNUNET_HashCode * key, void *value) 4738shutdown_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
4739{ 4739{
4740 struct MeshPeerInfo *p = value; 4740 struct MeshPeerInfo *p = value;
4741 struct MeshPeerQueue *q; 4741 struct MeshPeerQueue *q;