From 506163121bcfe92a54c33d819b38f418dd45b3cd Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 2 Oct 2010 13:30:41 +0000 Subject: [PATCH] new DHT API code --- src/dht/dht_api_find_peer.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/dht/dht_api_find_peer.c b/src/dht/dht_api_find_peer.c index 91713f988..98bec0d36 100644 --- a/src/dht/dht_api_find_peer.c +++ b/src/dht/dht_api_find_peer.c @@ -109,30 +109,19 @@ GNUNET_DHT_find_peer_start (struct GNUNET_DHT_Handle *handle, struct GNUNET_DHT_FindPeerHandle *find_peer_handle; struct GNUNET_DHT_FindPeerMessage find_peer_msg; - /* FIXME: remove this limitation */ - if ((handle->current != NULL) && (handle->retransmit_stage != DHT_RETRANSMITTING)) - { - /* Can't send right now, we have a pending message... */ - return NULL; - } - find_peer_handle = GNUNET_malloc (sizeof (struct GNUNET_DHT_FindPeerHandle)); - find_peer_handle->find_peer_context.proc = proc; - find_peer_handle->find_peer_context.proc_cls = proc_cls; - -#if DEBUG_DHT_API - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "`%s': Inserting pending `%s' request with key %s\n", "DHT API", - "FIND PEER", GNUNET_h2s (key)); -#endif - + find_peer_handle->proc = proc; + find_peer_handle->proc_cls = proc_cls; find_peer_msg.header.size = htons(sizeof(struct GNUNET_DHT_FindPeerMessage)); find_peer_msg.header.type = htons(GNUNET_MESSAGE_TYPE_DHT_FIND_PEER); find_peer_handle->route_handle = - GNUNET_DHT_route_start (handle, key, 0, options, &find_peer_msg.header, + GNUNET_DHT_route_start (handle, key, + 0, options, + &find_peer_msg.header, timeout, - &find_peer_reply_iterator, find_peer_handle); + &find_peer_reply_iterator, find_peer_handle, + NULL, NULL); GNUNET_break (find_peer_handle->route_handle != NULL); return find_peer_handle; } -- 2.25.1