aboutsummaryrefslogtreecommitdiff
path: root/src/ats/plugin_ats_mlp.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-05-05 13:09:00 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-05-05 13:09:00 +0000
commit04763dd4b84cafbdab8eb8b60f02a36173aad412 (patch)
treee4907a9c8f62301e9a42819494776d3324b929c5 /src/ats/plugin_ats_mlp.c
parent2f166164c80ef5065d8899e0f9f123a148b742b6 (diff)
downloadgnunet-04763dd4b84cafbdab8eb8b60f02a36173aad412.tar.gz
gnunet-04763dd4b84cafbdab8eb8b60f02a36173aad412.zip
fix: setting network in address with eval tool
Diffstat (limited to 'src/ats/plugin_ats_mlp.c')
-rw-r--r--src/ats/plugin_ats_mlp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ats/plugin_ats_mlp.c b/src/ats/plugin_ats_mlp.c
index 2a1dc7eb2..1ceb294ca 100644
--- a/src/ats/plugin_ats_mlp.c
+++ b/src/ats/plugin_ats_mlp.c
@@ -373,12 +373,12 @@ get_performance_info (struct ATS_Address *address, uint32_t type)
373 GNUNET_assert (NULL != address); 373 GNUNET_assert (NULL != address);
374 374
375 if ((NULL == address->atsi) || (0 == address->atsi_count)) 375 if ((NULL == address->atsi) || (0 == address->atsi_count))
376 return GNUNET_ATS_VALUE_UNDEFINED; 376 return GNUNET_ATS_VALUE_UNDEFINED;
377 377
378 for (c1 = 0; c1 < address->atsi_count; c1++) 378 for (c1 = 0; c1 < address->atsi_count; c1++)
379 { 379 {
380 if (ntohl(address->atsi[c1].type) == type) 380 if (ntohl (address->atsi[c1].type) == type)
381 return ntohl(address->atsi[c1].value); 381 return ntohl (address->atsi[c1].value);
382 } 382 }
383 return GNUNET_ATS_VALUE_UNDEFINED; 383 return GNUNET_ATS_VALUE_UNDEFINED;
384} 384}
@@ -737,7 +737,10 @@ mlp_create_problem_add_address_information (void *cls,
737 { 737 {
738 addr_net = get_performance_info (address, GNUNET_ATS_NETWORK_TYPE); 738 addr_net = get_performance_info (address, GNUNET_ATS_NETWORK_TYPE);
739 if (GNUNET_ATS_VALUE_UNDEFINED == addr_net) 739 if (GNUNET_ATS_VALUE_UNDEFINED == addr_net)
740 addr_net = GNUNET_ATS_NET_UNSPECIFIED; 740 {
741 GNUNET_break (0);
742 addr_net = GNUNET_ATS_NET_UNSPECIFIED;
743 }
741 744
742 if (mlp->pv.quota_index[c] == addr_net) 745 if (mlp->pv.quota_index[c] == addr_net)
743 { 746 {