diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-05-12 13:46:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-05-12 13:46:15 +0000 |
commit | d95d14541ab481ad4697a432b5598535af07804c (patch) | |
tree | 75ddd8430b9c919b732c47d82c2c5b685beba754 /src/dht | |
parent | f8e7538e60434dd3ea0548dedc6ab8fd73f46666 (diff) | |
download | gnunet-d95d14541ab481ad4697a432b5598535af07804c.tar.gz gnunet-d95d14541ab481ad4697a432b5598535af07804c.zip |
simplify
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/dht_api.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c index 5d3a83d4b..cd40314f4 100644 --- a/src/dht/dht_api.c +++ b/src/dht/dht_api.c | |||
@@ -279,6 +279,14 @@ add_request_to_pending (void *cls, | |||
279 | 279 | ||
280 | 280 | ||
281 | /** | 281 | /** |
282 | * Try to send messages from list of messages to send | ||
283 | * @param handle DHT_Handle | ||
284 | */ | ||
285 | static void | ||
286 | process_pending_messages (struct GNUNET_DHT_Handle *handle); | ||
287 | |||
288 | |||
289 | /** | ||
282 | * Try reconnecting to the dht service. | 290 | * Try reconnecting to the dht service. |
283 | * | 291 | * |
284 | * @param cls GNUNET_DHT_Handle | 292 | * @param cls GNUNET_DHT_Handle |
@@ -289,6 +297,7 @@ try_reconnect (void *cls, | |||
289 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 297 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
290 | { | 298 | { |
291 | struct GNUNET_DHT_Handle *handle = cls; | 299 | struct GNUNET_DHT_Handle *handle = cls; |
300 | |||
292 | handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 301 | handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK; |
293 | if (handle->retry_time.rel_value < GNUNET_CONSTANTS_SERVICE_RETRY.rel_value) | 302 | if (handle->retry_time.rel_value < GNUNET_CONSTANTS_SERVICE_RETRY.rel_value) |
294 | handle->retry_time = GNUNET_CONSTANTS_SERVICE_RETRY; | 303 | handle->retry_time = GNUNET_CONSTANTS_SERVICE_RETRY; |
@@ -304,19 +313,10 @@ try_reconnect (void *cls, | |||
304 | "dht reconnect failed(!)\n"); | 313 | "dht reconnect failed(!)\n"); |
305 | return; | 314 | return; |
306 | } | 315 | } |
307 | |||
308 | GNUNET_CONTAINER_multihashmap_iterate (handle->active_requests, | 316 | GNUNET_CONTAINER_multihashmap_iterate (handle->active_requests, |
309 | &add_request_to_pending, | 317 | &add_request_to_pending, |
310 | handle); | 318 | handle); |
311 | if (handle->pending_head == NULL) | 319 | process_pending_messages (handle); |
312 | return; | ||
313 | |||
314 | GNUNET_CLIENT_notify_transmit_ready (handle->client, | ||
315 | ntohs(handle->pending_head->msg->size), | ||
316 | GNUNET_TIME_UNIT_FOREVER_REL, | ||
317 | GNUNET_NO, | ||
318 | &transmit_pending, | ||
319 | handle); | ||
320 | } | 320 | } |
321 | 321 | ||
322 | 322 | ||