- fix
[oweals/gnunet.git] / src / regex / regex_dht.c
index 27fa82a7cf45a9190aa87baadf369d4c76538b83..f9e25c274d72d6aef8a8700137db874f7bcf0adc 100644 (file)
@@ -446,7 +446,7 @@ dht_get_string_handler (void *cls, struct GNUNET_TIME_Absolute exp,
   datastore = GNUNET_strdup ("N/A");
 #endif
 
-  LOG (GNUNET_ERROR_TYPE_INFO, " DHT GET result for %s (%s) at %s\n", 
+  LOG (GNUNET_ERROR_TYPE_INFO, " DHT GET result for %s (%s) at %s\n",
        GNUNET_h2s (key), ctx->info->description, datastore);
   GNUNET_free (datastore);
 
@@ -454,7 +454,8 @@ dht_get_string_handler (void *cls, struct GNUNET_TIME_Absolute exp,
   memcpy (copy, data, size);
   GNUNET_break (
     GNUNET_OK ==
-    GNUNET_CONTAINER_multihashmap_put (info->dht_get_results, key, copy,
+    GNUNET_CONTAINER_multihashmap_put (info->dht_get_results,
+                                       &((struct RegexBlock *)copy)->key, copy,
                                        GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)
                );
   len = ntohl (block->n_proof);
@@ -632,7 +633,8 @@ regex_next_edge (const struct RegexBlock *block,
   if (GNUNET_YES ==
       GNUNET_CONTAINER_multihashmap_contains (info->dht_get_handles, hash))
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "*     GET running, END\n");
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "*     GET for %s running, END\n",
+         GNUNET_h2s (hash));
     GNUNET_CONTAINER_multihashmap_get_multiple (info->dht_get_results,
                                                 hash,
                                                 &regex_result_iterator,
@@ -693,7 +695,7 @@ GNUNET_REGEX_search (struct GNUNET_DHT_Handle *dht,
   h->callback = callback;
   h->callback_cls = callback_cls;
   h->stats = stats;
-  h->dht_get_handles = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_YES);
+  h->dht_get_handles = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_NO);
   h->dht_get_results = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_YES);
 
   /* Initialize context */
@@ -808,4 +810,4 @@ GNUNET_REGEX_search_cancel (struct GNUNET_REGEX_search_handle *h)
 
 
 
-/* end of regex_dht.c */
\ No newline at end of file
+/* end of regex_dht.c */