diff options
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index a5c9b131a..fdc0007ed 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -33,7 +33,7 @@ | |||
33 | * - MESH LOCAL HANDLER HELPERS | 33 | * - MESH LOCAL HANDLER HELPERS |
34 | * - MESH LOCAL HANDLES | 34 | * - MESH LOCAL HANDLES |
35 | * - MAIN FUNCTIONS (main & run) | 35 | * - MAIN FUNCTIONS (main & run) |
36 | * | 36 | * |
37 | * TODO: | 37 | * TODO: |
38 | * - error reporting (CREATE/CHANGE/ADD/DEL?) -- new message! | 38 | * - error reporting (CREATE/CHANGE/ADD/DEL?) -- new message! |
39 | * - partial disconnect reporting -- same as error reporting? | 39 | * - partial disconnect reporting -- same as error reporting? |
@@ -797,7 +797,7 @@ destroy_tunnel (struct MeshTunnel *t) | |||
797 | 797 | ||
798 | /** | 798 | /** |
799 | * Periodically announce what applications are provided by local clients | 799 | * Periodically announce what applications are provided by local clients |
800 | * | 800 | * |
801 | * @param cls closure | 801 | * @param cls closure |
802 | * @param tc task context | 802 | * @param tc task context |
803 | */ | 803 | */ |
@@ -844,7 +844,7 @@ announce_applications (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
844 | 844 | ||
845 | /** | 845 | /** |
846 | * Periodically announce self id in the DHT | 846 | * Periodically announce self id in the DHT |
847 | * | 847 | * |
848 | * @param cls closure | 848 | * @param cls closure |
849 | * @param tc task context | 849 | * @param tc task context |
850 | */ | 850 | */ |
@@ -1199,7 +1199,7 @@ send_p2p_tunnel_destroy (void *cls, size_t size, void *buf) | |||
1199 | 1199 | ||
1200 | /** | 1200 | /** |
1201 | * Send the message to all clients that have subscribed to its type | 1201 | * Send the message to all clients that have subscribed to its type |
1202 | * | 1202 | * |
1203 | * @param msg Pointer to the message itself | 1203 | * @param msg Pointer to the message itself |
1204 | * @return number of clients this message was sent to | 1204 | * @return number of clients this message was sent to |
1205 | */ | 1205 | */ |
@@ -1294,7 +1294,8 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1294 | struct MeshPeerInfo *orig_peer_info; | 1294 | struct MeshPeerInfo *orig_peer_info; |
1295 | struct MeshTunnel *t; | 1295 | struct MeshTunnel *t; |
1296 | 1296 | ||
1297 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: Received a MESH path create msg\n"); | 1297 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1298 | "MESH: Received a MESH path create msg\n"); | ||
1298 | size = ntohs (message->size); | 1299 | size = ntohs (message->size); |
1299 | if (size < sizeof (struct GNUNET_MESH_ManipulatePath)) | 1300 | if (size < sizeof (struct GNUNET_MESH_ManipulatePath)) |
1300 | { | 1301 | { |
@@ -2057,7 +2058,7 @@ handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) | |||
2057 | 2058 | ||
2058 | /** | 2059 | /** |
2059 | * Handler for new clients | 2060 | * Handler for new clients |
2060 | * | 2061 | * |
2061 | * @param cls closure | 2062 | * @param cls closure |
2062 | * @param client identification of the client | 2063 | * @param client identification of the client |
2063 | * @param message the actual message, which includes messages the client wants | 2064 | * @param message the actual message, which includes messages the client wants |
@@ -2137,8 +2138,9 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client, | |||
2137 | } | 2138 | } |
2138 | } | 2139 | } |
2139 | } | 2140 | } |
2140 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: client has %u+%u subscriptions\n", | 2141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2141 | c->type_counter, c->app_counter); | 2142 | "MESH: client has %u+%u subscriptions\n", c->type_counter, |
2143 | c->app_counter); | ||
2142 | 2144 | ||
2143 | GNUNET_CONTAINER_DLL_insert (clients, clients_tail, c); | 2145 | GNUNET_CONTAINER_DLL_insert (clients, clients_tail, c); |
2144 | c->tunnels = GNUNET_CONTAINER_multihashmap_create (32); | 2146 | c->tunnels = GNUNET_CONTAINER_multihashmap_create (32); |
@@ -2151,7 +2153,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client, | |||
2151 | 2153 | ||
2152 | /** | 2154 | /** |
2153 | * Handler for requests of new tunnels | 2155 | * Handler for requests of new tunnels |
2154 | * | 2156 | * |
2155 | * @param cls closure | 2157 | * @param cls closure |
2156 | * @param client identification of the client | 2158 | * @param client identification of the client |
2157 | * @param message the actual message | 2159 | * @param message the actual message |
@@ -2233,7 +2235,7 @@ handle_local_tunnel_create (void *cls, struct GNUNET_SERVER_Client *client, | |||
2233 | 2235 | ||
2234 | /** | 2236 | /** |
2235 | * Handler for requests of deleting tunnels | 2237 | * Handler for requests of deleting tunnels |
2236 | * | 2238 | * |
2237 | * @param cls closure | 2239 | * @param cls closure |
2238 | * @param client identification of the client | 2240 | * @param client identification of the client |
2239 | * @param message the actual message | 2241 | * @param message the actual message |
@@ -2286,7 +2288,7 @@ handle_local_tunnel_destroy (void *cls, struct GNUNET_SERVER_Client *client, | |||
2286 | 2288 | ||
2287 | /** | 2289 | /** |
2288 | * Handler for connection requests to new peers | 2290 | * Handler for connection requests to new peers |
2289 | * | 2291 | * |
2290 | * @param cls closure | 2292 | * @param cls closure |
2291 | * @param client identification of the client | 2293 | * @param client identification of the client |
2292 | * @param message the actual message (PeerControl) | 2294 | * @param message the actual message (PeerControl) |
@@ -2359,7 +2361,7 @@ handle_local_connect_add (void *cls, struct GNUNET_SERVER_Client *client, | |||
2359 | 2361 | ||
2360 | /** | 2362 | /** |
2361 | * Handler for disconnection requests of peers in a tunnel | 2363 | * Handler for disconnection requests of peers in a tunnel |
2362 | * | 2364 | * |
2363 | * @param cls closure | 2365 | * @param cls closure |
2364 | * @param client identification of the client | 2366 | * @param client identification of the client |
2365 | * @param message the actual message (PeerControl) | 2367 | * @param message the actual message (PeerControl) |
@@ -2418,7 +2420,7 @@ handle_local_connect_del (void *cls, struct GNUNET_SERVER_Client *client, | |||
2418 | 2420 | ||
2419 | /** | 2421 | /** |
2420 | * Handler for connection requests to new peers by type | 2422 | * Handler for connection requests to new peers by type |
2421 | * | 2423 | * |
2422 | * @param cls closure | 2424 | * @param cls closure |
2423 | * @param client identification of the client | 2425 | * @param client identification of the client |
2424 | * @param message the actual message (ConnectPeerByType) | 2426 | * @param message the actual message (ConnectPeerByType) |
@@ -2515,7 +2517,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client, | |||
2515 | 2517 | ||
2516 | /** | 2518 | /** |
2517 | * Handler for client traffic directed to one peer | 2519 | * Handler for client traffic directed to one peer |
2518 | * | 2520 | * |
2519 | * @param cls closure | 2521 | * @param cls closure |
2520 | * @param client identification of the client | 2522 | * @param client identification of the client |
2521 | * @param message the actual message | 2523 | * @param message the actual message |
@@ -2608,7 +2610,7 @@ handle_local_unicast (void *cls, struct GNUNET_SERVER_Client *client, | |||
2608 | 2610 | ||
2609 | /** | 2611 | /** |
2610 | * Handler for client traffic directed to all peers in a tunnel | 2612 | * Handler for client traffic directed to all peers in a tunnel |
2611 | * | 2613 | * |
2612 | * @param cls closure | 2614 | * @param cls closure |
2613 | * @param client identification of the client | 2615 | * @param client identification of the client |
2614 | * @param message the actual message | 2616 | * @param message the actual message |
@@ -2807,9 +2809,10 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
2807 | GNUNET_SERVER_notification_context_destroy (nc); | 2809 | GNUNET_SERVER_notification_context_destroy (nc); |
2808 | nc = NULL; | 2810 | nc = NULL; |
2809 | } | 2811 | } |
2810 | if (0 != announce_id_task) { | 2812 | if (0 != announce_id_task) |
2811 | GNUNET_SCHEDULER_cancel(announce_id_task); | 2813 | { |
2812 | announce_id_task = 0; | 2814 | GNUNET_SCHEDULER_cancel (announce_id_task); |
2815 | announce_id_task = 0; | ||
2813 | } | 2816 | } |
2814 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: shut down\n"); | 2817 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: shut down\n"); |
2815 | } | 2818 | } |