}
if (NULL != head->cont)
{
- GNUNET_SCHEDULER_add_now (handle->sched,
- head->cont,
- head->cont_cls);
+ GNUNET_SCHEDULER_add_continuation (handle->sched,
+ head->cont,
+ head->cont_cls,
+ GNUNET_SCHEDULER_REASON_PREREQ_DONE);
head->cont = NULL;
head->cont_cls = NULL;
}
-/* ***** Special low-level API providing generic routeing abstraction ***** */
+/* ***** Special low-level API providing generic routing abstraction ***** */
/**
message->key = *key;
message->options = htonl ((uint32_t) options);
message->desired_replication_level = htonl (desired_replication_level);
+ handle->uid_gen++;
+ message->unique_id = GNUNET_htonll (handle->uid_gen);
memcpy (&message[1], enc, esize);
+
if (iter != NULL)
{
route_handle = GNUNET_malloc (sizeof (struct GNUNET_DHT_RouteHandle));
route_handle->iter = iter;
route_handle->iter_cls = iter_cls;
route_handle->dht_handle = handle;
- route_handle->uid = handle->uid_gen++;
+ route_handle->uid = handle->uid_gen;
route_handle->message = pending;
- message->unique_id = GNUNET_htonll (route_handle->uid);
GNUNET_CONTAINER_multihashmap_put (handle->active_requests,
key,
route_handle,