From 838ed7f52d45e6545942c7c0d3b9e284ee4475e5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 16 Jun 2014 08:03:26 +0000 Subject: bugfix: only create another address entry if we did not have one already --- src/ats-tool/gnunet-ats.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/ats-tool') diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c index abba6abb3..1055057dd 100644 --- a/src/ats-tool/gnunet-ats.c +++ b/src/ats-tool/gnunet-ats.c @@ -397,14 +397,17 @@ ats_perf_mon_cb (void *cls, actx.res->bandwidth_out = bandwidth_out; } } - a = GNUNET_new (struct ATSAddress); - a->address = GNUNET_HELLO_address_copy(address); - a->bandwidth_in = bandwidth_in; - a->bandwidth_out = bandwidth_out; - GNUNET_CONTAINER_multipeermap_put (addresses, - &address->peer, - a, - GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); + else + { + a = GNUNET_new (struct ATSAddress); + a->address = GNUNET_HELLO_address_copy(address); + a->bandwidth_in = bandwidth_in; + a->bandwidth_out = bandwidth_out; + GNUNET_CONTAINER_multipeermap_put (addresses, + &address->peer, + a, + GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); + } } pr = GNUNET_malloc (sizeof (struct PendingResolutions) + -- cgit v1.2.3