From: Philipp Tölke Date: Mon, 21 Feb 2011 10:03:43 +0000 (+0000) Subject: get rid of unnecessary error X-Git-Tag: initial-import-from-subversion-38251~19088 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b35e4e090c6bfcc6eb5cc5ba4f563b1a91749b65;p=oweals%2Fgnunet.git get rid of unnecessary error --- diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index d22062074..32bbb4cdb 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -266,14 +266,12 @@ process_answer(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tc) { value->additional_ports = 0; - if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put(hashmap, - &key, - value, - GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) - { - GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Could not store to hashmap\n"); - GNUNET_free(value); - } + if (GNUNET_NO == + GNUNET_CONTAINER_multihashmap_contains (hashmap, &key)) + GNUNET_CONTAINER_multihashmap_put (hashmap, &key, value, + GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY); + else + GNUNET_free(value); list = GNUNET_malloc(htons(pkt->hdr.size) + 2*sizeof(struct answer_packet_list*));