aboutsummaryrefslogtreecommitdiff
path: root/src/ats-tool
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-06-16 08:03:26 +0000
committerChristian Grothoff <christian@grothoff.org>2014-06-16 08:03:26 +0000
commit838ed7f52d45e6545942c7c0d3b9e284ee4475e5 (patch)
tree249e37ca2ef00424e5f89d52b90675dea13cc1f9 /src/ats-tool
parent9a5c11fe129d8572c38e3739adcd218029c87a4e (diff)
downloadgnunet-838ed7f52d45e6545942c7c0d3b9e284ee4475e5.tar.gz
gnunet-838ed7f52d45e6545942c7c0d3b9e284ee4475e5.zip
bugfix: only create another address entry if we did not have one already
Diffstat (limited to 'src/ats-tool')
-rw-r--r--src/ats-tool/gnunet-ats.c19
1 files changed, 11 insertions, 8 deletions
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,
397 actx.res->bandwidth_out = bandwidth_out; 397 actx.res->bandwidth_out = bandwidth_out;
398 } 398 }
399 } 399 }
400 a = GNUNET_new (struct ATSAddress); 400 else
401 a->address = GNUNET_HELLO_address_copy(address); 401 {
402 a->bandwidth_in = bandwidth_in; 402 a = GNUNET_new (struct ATSAddress);
403 a->bandwidth_out = bandwidth_out; 403 a->address = GNUNET_HELLO_address_copy(address);
404 GNUNET_CONTAINER_multipeermap_put (addresses, 404 a->bandwidth_in = bandwidth_in;
405 &address->peer, 405 a->bandwidth_out = bandwidth_out;
406 a, 406 GNUNET_CONTAINER_multipeermap_put (addresses,
407 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); 407 &address->peer,
408 a,
409 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
410 }
408 } 411 }
409 412
410 pr = GNUNET_malloc (sizeof (struct PendingResolutions) + 413 pr = GNUNET_malloc (sizeof (struct PendingResolutions) +