From: Philipp Tölke Date: Wed, 15 Jun 2011 07:15:37 +0000 (+0000) Subject: update the cost later X-Git-Tag: initial-import-from-subversion-38251~18191 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cf8314b252ee3e439422b8dd372660d073db5562;p=oweals%2Fgnunet.git update the cost later --- diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index 34a480a3e..49a33a7bb 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -357,9 +357,6 @@ process_answer(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tc) { } struct map_entry* map_entry = GNUNET_CONTAINER_multihashmap_get(hashmap, &key); - GNUNET_CONTAINER_heap_update_cost (heap, map_entry->heap_node, - GNUNET_TIME_absolute_get ().abs_value); - uint16_t offset = ntohs(pkt->addroffset); if (map_entry == NULL) @@ -368,6 +365,10 @@ process_answer(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tc) { return; } + GNUNET_CONTAINER_heap_update_cost (heap, map_entry->heap_node, + GNUNET_TIME_absolute_get ().abs_value); + + unsigned short namelen = htons(map_entry->namelen); char* name = (char*)(map_entry + 1);