diff options
Diffstat (limited to 'src/dv')
-rw-r--r-- | src/dv/dv.h | 12 | ||||
-rw-r--r-- | src/dv/dv_api.c | 7 | ||||
-rw-r--r-- | src/dv/gnunet-service-dv.c | 40 | ||||
-rw-r--r-- | src/dv/test_transport_api_dv.c | 4 |
4 files changed, 31 insertions, 32 deletions
diff --git a/src/dv/dv.h b/src/dv/dv.h index 3c62a22bc..1d4912f84 100644 --- a/src/dv/dv.h +++ b/src/dv/dv.h | |||
@@ -257,17 +257,17 @@ typedef struct | |||
257 | } p2p_dv_MESSAGE_Disconnect; | 257 | } p2p_dv_MESSAGE_Disconnect; |
258 | 258 | ||
259 | 259 | ||
260 | struct GNUNET_DV_Handle *GNUNET_DV_connect (const struct | 260 | struct GNUNET_DV_Handle * |
261 | GNUNET_CONFIGURATION_Handle *cfg, | 261 | GNUNET_DV_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
262 | GNUNET_DV_MessageReceivedHandler | 262 | GNUNET_DV_MessageReceivedHandler receive_handler, |
263 | receive_handler, | 263 | void *receive_handler_cls); |
264 | void *receive_handler_cls); | ||
265 | 264 | ||
266 | /** | 265 | /** |
267 | * Disconnect from the DV service | 266 | * Disconnect from the DV service |
268 | * | 267 | * |
269 | * @param handle the current handle to the service to disconnect | 268 | * @param handle the current handle to the service to disconnect |
270 | */ | 269 | */ |
271 | void GNUNET_DV_disconnect (struct GNUNET_DV_Handle *handle); | 270 | void |
271 | GNUNET_DV_disconnect (struct GNUNET_DV_Handle *handle); | ||
272 | 272 | ||
273 | #endif | 273 | #endif |
diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c index 3450e5844..d4c07ecdc 100644 --- a/src/dv/dv_api.c +++ b/src/dv/dv_api.c | |||
@@ -180,7 +180,8 @@ try_connect (struct GNUNET_DV_Handle *ret) | |||
180 | return GNUNET_NO; | 180 | return GNUNET_NO; |
181 | } | 181 | } |
182 | 182 | ||
183 | static void process_pending_message (struct GNUNET_DV_Handle *handle); | 183 | static void |
184 | process_pending_message (struct GNUNET_DV_Handle *handle); | ||
184 | 185 | ||
185 | /** | 186 | /** |
186 | * Send complete, schedule next | 187 | * Send complete, schedule next |
@@ -284,8 +285,8 @@ process_pending_message (struct GNUNET_DV_Handle *handle) | |||
284 | if (NULL == | 285 | if (NULL == |
285 | (handle->th = | 286 | (handle->th = |
286 | GNUNET_CLIENT_notify_transmit_ready (handle->client, | 287 | GNUNET_CLIENT_notify_transmit_ready (handle->client, |
287 | ntohs (handle->current->msg->header. | 288 | ntohs (handle->current->msg-> |
288 | size), | 289 | header.size), |
289 | handle->current->msg->timeout, | 290 | handle->current->msg->timeout, |
290 | GNUNET_YES, &transmit_pending, | 291 | GNUNET_YES, &transmit_pending, |
291 | handle))) | 292 | handle))) |
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 876d056ac..6699fef11 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -761,8 +761,8 @@ transmit_to_plugin (void *cls, size_t size, void *buf) | |||
761 | if (plugin_pending_head != NULL) | 761 | if (plugin_pending_head != NULL) |
762 | plugin_transmit_handle = | 762 | plugin_transmit_handle = |
763 | GNUNET_SERVER_notify_transmit_ready (client_handle, | 763 | GNUNET_SERVER_notify_transmit_ready (client_handle, |
764 | ntohs (plugin_pending_head-> | 764 | ntohs (plugin_pending_head->msg-> |
765 | msg->size), | 765 | size), |
766 | GNUNET_TIME_UNIT_FOREVER_REL, | 766 | GNUNET_TIME_UNIT_FOREVER_REL, |
767 | &transmit_to_plugin, NULL); | 767 | &transmit_to_plugin, NULL); |
768 | 768 | ||
@@ -858,7 +858,8 @@ send_to_plugin (const struct GNUNET_PeerIdentity *sender, | |||
858 | } | 858 | } |
859 | 859 | ||
860 | /* Declare here so retry_core_send is aware of it */ | 860 | /* Declare here so retry_core_send is aware of it */ |
861 | size_t core_transmit_notify (void *cls, size_t size, void *buf); | 861 | size_t |
862 | core_transmit_notify (void *cls, size_t size, void *buf); | ||
862 | 863 | ||
863 | /** | 864 | /** |
864 | * Try to send another message from our core sending list | 865 | * Try to send another message from our core sending list |
@@ -999,9 +1000,9 @@ send_message_via (const struct GNUNET_PeerIdentity *sender, | |||
999 | find_context.via = recipient; | 1000 | find_context.via = recipient; |
1000 | find_context.tid = 0; | 1001 | find_context.tid = 0; |
1001 | GNUNET_CONTAINER_multihashmap_get_multiple (extended_neighbors, | 1002 | GNUNET_CONTAINER_multihashmap_get_multiple (extended_neighbors, |
1002 | &send_context->distant_peer-> | 1003 | &send_context-> |
1003 | hashPubKey, &find_specific_id, | 1004 | distant_peer->hashPubKey, |
1004 | &find_context); | 1005 | &find_specific_id, &find_context); |
1005 | 1006 | ||
1006 | if (find_context.tid == 0) | 1007 | if (find_context.tid == 0) |
1007 | { | 1008 | { |
@@ -2071,19 +2072,16 @@ handle_dv_send_message (void *cls, struct GNUNET_SERVER_Client *client, | |||
2071 | } | 2072 | } |
2072 | 2073 | ||
2073 | /** Forward declarations **/ | 2074 | /** Forward declarations **/ |
2074 | static int handle_dv_gossip_message (void *cls, | 2075 | static int |
2075 | const struct GNUNET_PeerIdentity *peer, | 2076 | handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer, |
2076 | const struct GNUNET_MessageHeader *message, | 2077 | const struct GNUNET_MessageHeader *message, |
2077 | const struct | 2078 | const struct GNUNET_TRANSPORT_ATS_Information *atsi); |
2078 | GNUNET_TRANSPORT_ATS_Information *atsi); | 2079 | |
2079 | 2080 | static int | |
2080 | static int handle_dv_disconnect_message (void *cls, | 2081 | handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer, |
2081 | const struct GNUNET_PeerIdentity *peer, | 2082 | const struct GNUNET_MessageHeader *message, |
2082 | const struct GNUNET_MessageHeader | 2083 | const struct GNUNET_TRANSPORT_ATS_Information |
2083 | *message, | 2084 | *atsi); |
2084 | const struct | ||
2085 | GNUNET_TRANSPORT_ATS_Information | ||
2086 | *atsi); | ||
2087 | /** End forward declarations **/ | 2085 | /** End forward declarations **/ |
2088 | 2086 | ||
2089 | 2087 | ||
@@ -2658,8 +2656,8 @@ addUpdateNeighbor (const struct GNUNET_PeerIdentity *peer, | |||
2658 | atsi[0].value = htonl (referrer->pending_messages[i].distance); | 2656 | atsi[0].value = htonl (referrer->pending_messages[i].distance); |
2659 | atsi[1].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY); | 2657 | atsi[1].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY); |
2660 | atsi[1].value = | 2658 | atsi[1].value = |
2661 | htonl ((uint32_t) referrer->pending_messages[i].latency. | 2659 | htonl ((uint32_t) referrer->pending_messages[i]. |
2662 | rel_value); | 2660 | latency.rel_value); |
2663 | atsi[2].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 2661 | atsi[2].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); |
2664 | atsi[2].value = htonl (0); | 2662 | atsi[2].value = htonl (0); |
2665 | handle_dv_data_message (NULL, &referrer->pending_messages[i].sender, | 2663 | handle_dv_data_message (NULL, &referrer->pending_messages[i].sender, |
diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c index fee8eea81..e66caa4f6 100644 --- a/src/dv/test_transport_api_dv.c +++ b/src/dv/test_transport_api_dv.c | |||
@@ -382,8 +382,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
382 | } | 382 | } |
383 | } | 383 | } |
384 | 384 | ||
385 | static void send_other_messages (void *cls, | 385 | static void |
386 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 386 | send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
387 | 387 | ||
388 | /** | 388 | /** |
389 | * Get distance information from 'atsi'. | 389 | * Get distance information from 'atsi'. |