aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-10-07 09:10:42 +0000
committerNathan S. Evans <evans@in.tum.de>2010-10-07 09:10:42 +0000
commit3ef49aae956c39eab2062d0bffbe1d3e971329a0 (patch)
treedf7a89476e26bc987cd4d1b052750ca34f6a403c /src
parent852435ae4a803dd40b5975199c30d2819bef600c (diff)
downloadgnunet-3ef49aae956c39eab2062d0bffbe1d3e971329a0.tar.gz
gnunet-3ef49aae956c39eab2062d0bffbe1d3e971329a0.zip
unique id is quite useful for the dht, even for puts
Diffstat (limited to 'src')
-rw-r--r--src/dht/dht_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index 561aa0a77..17a215681 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -694,7 +694,10 @@ GNUNET_DHT_route_start (struct GNUNET_DHT_Handle *handle,
694 message->key = *key; 694 message->key = *key;
695 message->options = htonl ((uint32_t) options); 695 message->options = htonl ((uint32_t) options);
696 message->desired_replication_level = htonl (desired_replication_level); 696 message->desired_replication_level = htonl (desired_replication_level);
697 handle->uid_gen++;
698 message->unique_id = GNUNET_htonll (handle->uid_gen);
697 memcpy (&message[1], enc, esize); 699 memcpy (&message[1], enc, esize);
700
698 if (iter != NULL) 701 if (iter != NULL)
699 { 702 {
700 route_handle = GNUNET_malloc (sizeof (struct GNUNET_DHT_RouteHandle)); 703 route_handle = GNUNET_malloc (sizeof (struct GNUNET_DHT_RouteHandle));
@@ -702,9 +705,8 @@ GNUNET_DHT_route_start (struct GNUNET_DHT_Handle *handle,
702 route_handle->iter = iter; 705 route_handle->iter = iter;
703 route_handle->iter_cls = iter_cls; 706 route_handle->iter_cls = iter_cls;
704 route_handle->dht_handle = handle; 707 route_handle->dht_handle = handle;
705 route_handle->uid = handle->uid_gen++; 708 route_handle->uid = handle->uid_gen;
706 route_handle->message = pending; 709 route_handle->message = pending;
707 message->unique_id = GNUNET_htonll (route_handle->uid);
708 GNUNET_CONTAINER_multihashmap_put (handle->active_requests, 710 GNUNET_CONTAINER_multihashmap_put (handle->active_requests,
709 key, 711 key,
710 route_handle, 712 route_handle,