- char *datastore;
-
-#if DEBUG_DHT
- if ( (NULL != put_path) &&
- (0 != put_path_length) )
- {
- datastore = GNUNET_strdup (GNUNET_i2s (&put_path[put_path_length - 1]));
- }
- else
- {
- GNUNET_asprintf (&datastore, "?? %u/%u", put_path_length, get_path_length);
- }
-#else
- datastore = GNUNET_strdup ("N/A");
-#endif
-
- LOG (GNUNET_ERROR_TYPE_INFO, " DHT GET result for %s (%s) at %s\n",
- GNUNET_h2s (key), ctx->info->description, datastore);
- GNUNET_free (datastore);
-
- copy = GNUNET_malloc (size);
- memcpy (copy, data, size);
- GNUNET_break (
- GNUNET_OK ==
- GNUNET_CONTAINER_multihashmap_put (info->dht_get_results,
- key, copy,
- GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)
- );
+ struct Result *copy;
+
+ LOG (GNUNET_ERROR_TYPE_INFO,
+ "DHT GET result for %s (%s)\n",
+ GNUNET_h2s (key), ctx->info->description);
+ copy = GNUNET_malloc (sizeof (struct Result) + size);
+ copy->size = size;
+ copy->data = ©[1];
+ memcpy (©[1], block, size);
+ GNUNET_break (GNUNET_OK ==
+ GNUNET_CONTAINER_multihashmap_put (info->dht_get_results,
+ key, copy,
+ GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));