gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13119 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r13119 - gnunet/src/dht
Date: Sat, 2 Oct 2010 15:30:41 +0200

Author: grothoff
Date: 2010-10-02 15:30:41 +0200 (Sat, 02 Oct 2010)
New Revision: 13119

Modified:
   gnunet/src/dht/dht_api_find_peer.c
Log:
new DHT API code

Modified: gnunet/src/dht/dht_api_find_peer.c
===================================================================
--- gnunet/src/dht/dht_api_find_peer.c  2010-10-02 13:29:42 UTC (rev 13118)
+++ gnunet/src/dht/dht_api_find_peer.c  2010-10-02 13:30:41 UTC (rev 13119)
@@ -109,30 +109,19 @@
   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;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]