diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-02-13 12:18:32 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-02-13 12:18:32 +0000 |
commit | fdf868ccfe16df9b8cd2f2fa892a9a6c8a846bb6 (patch) | |
tree | 8691a77f020e1abd001c445cdbdca4c62e0e8df1 /src/mesh | |
parent | 26ea58eb2ef9a90d31e57e054ba26c5968dcb00a (diff) | |
download | gnunet-fdf868ccfe16df9b8cd2f2fa892a9a6c8a846bb6.tar.gz gnunet-fdf868ccfe16df9b8cd2f2fa892a9a6c8a846bb6.zip |
- fix crash
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 11 | ||||
-rw-r--r-- | src/mesh/test_mesh_2dtorus.conf | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 4b3ea2538..15e002b46 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -771,7 +771,7 @@ struct MeshClient | |||
771 | struct GNUNET_SERVER_Client *handle; | 771 | struct GNUNET_SERVER_Client *handle; |
772 | 772 | ||
773 | /** | 773 | /** |
774 | * Applications that this client has claimed to provide | 774 | * Applications that this client has claimed to provide: H(app) = app. |
775 | */ | 775 | */ |
776 | struct GNUNET_CONTAINER_MultiHashMap *apps; | 776 | struct GNUNET_CONTAINER_MultiHashMap *apps; |
777 | 777 | ||
@@ -997,7 +997,7 @@ static MESH_TunnelNumber next_tid; | |||
997 | static MESH_TunnelNumber next_local_tid; | 997 | static MESH_TunnelNumber next_local_tid; |
998 | 998 | ||
999 | /** | 999 | /** |
1000 | * All application types provided by this peer. | 1000 | * All application types provided by this peer: H(app) = *Client. |
1001 | */ | 1001 | */ |
1002 | static struct GNUNET_CONTAINER_MultiHashMap *applications; | 1002 | static struct GNUNET_CONTAINER_MultiHashMap *applications; |
1003 | 1003 | ||
@@ -6094,9 +6094,10 @@ static struct GNUNET_CORE_MessageHandler core_handlers[] = { | |||
6094 | static int | 6094 | static int |
6095 | deregister_app (void *cls, const struct GNUNET_HashCode * key, void *value) | 6095 | deregister_app (void *cls, const struct GNUNET_HashCode * key, void *value) |
6096 | { | 6096 | { |
6097 | struct GNUNET_CONTAINER_MultiHashMap *h = cls; | 6097 | struct MeshClient *c = cls; |
6098 | |||
6098 | GNUNET_break (GNUNET_YES == | 6099 | GNUNET_break (GNUNET_YES == |
6099 | GNUNET_CONTAINER_multihashmap_remove (h, key, value)); | 6100 | GNUNET_CONTAINER_multihashmap_remove (applications, key, c)); |
6100 | return GNUNET_OK; | 6101 | return GNUNET_OK; |
6101 | } | 6102 | } |
6102 | 6103 | ||
@@ -6337,7 +6338,7 @@ handle_local_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) | |||
6337 | /* deregister clients applications */ | 6338 | /* deregister clients applications */ |
6338 | if (NULL != c->apps) | 6339 | if (NULL != c->apps) |
6339 | { | 6340 | { |
6340 | GNUNET_CONTAINER_multihashmap_iterate (c->apps, &deregister_app, c->apps); | 6341 | GNUNET_CONTAINER_multihashmap_iterate (c->apps, &deregister_app, c); |
6341 | GNUNET_CONTAINER_multihashmap_destroy (c->apps); | 6342 | GNUNET_CONTAINER_multihashmap_destroy (c->apps); |
6342 | } | 6343 | } |
6343 | if (0 == GNUNET_CONTAINER_multihashmap_size (applications) && | 6344 | if (0 == GNUNET_CONTAINER_multihashmap_size (applications) && |
diff --git a/src/mesh/test_mesh_2dtorus.conf b/src/mesh/test_mesh_2dtorus.conf index fb235fe70..708ab0a50 100644 --- a/src/mesh/test_mesh_2dtorus.conf +++ b/src/mesh/test_mesh_2dtorus.conf | |||
@@ -16,8 +16,6 @@ WEAKRANDOM = YES | |||
16 | NUM_PEERS = 16 | 16 | NUM_PEERS = 16 |
17 | OVERLAY_TOPOLOGY = 2D_TORUS | 17 | OVERLAY_TOPOLOGY = 2D_TORUS |
18 | 18 | ||
19 | |||
20 | |||
21 | [arm] | 19 | [arm] |
22 | PORT = 10010 | 20 | PORT = 10010 |
23 | DEFAULTSERVICES = core dht mesh | 21 | DEFAULTSERVICES = core dht mesh |