From: Christian Grothoff Date: Mon, 17 Oct 2011 09:45:17 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~16486 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6ce568dd2050bda7acb9c84ffa6041b2bd88fab8;p=oweals%2Fgnunet.git fix --- diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index b12a90bd4..af4669dbd 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c @@ -268,7 +268,7 @@ GAS_addresses_update (const struct GNUNET_PeerIdentity *peer, GNUNET_free (aa); } for (i=0;iatsp_utilization_out.value__ = atsi[i].value; diff --git a/src/ats/test_ats_api_scheduling.c b/src/ats/test_ats_api_scheduling.c index 7dfd887fd..201855283 100644 --- a/src/ats/test_ats_api_scheduling.c +++ b/src/ats/test_ats_api_scheduling.c @@ -207,18 +207,18 @@ check (void *cls, char *const *args, const char *cfgfile, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Testing ATS info creation\n"); - atsi[0].type = htons (1); - atsi[0].type = htons (1); + atsi[0].type = htonl (GNUNET_ATS_UTILIZATION_UP); + atsi[0].value = htonl (1024); GNUNET_ATS_address_update(ats, &p[0].id, addr[0].plugin, addr[0].addr, addr[0].addr_len, addr[0].session, atsi, 1); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Testing ATS info merging\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Testing ATS info update\n"); - atsi[0].type = htons (1); - atsi[0].type = htons (2); + atsi[0].type = htonl (GNUNET_ATS_UTILIZATION_UP); + atsi[0].value = htonl (2048); - atsi[1].type = htons (2); - atsi[1].type = htons (2); + atsi[1].type = htonl (GNUNET_ATS_UTILIZATION_DOWN); + atsi[1].value = htonl (1024); GNUNET_ATS_address_update(ats, &p[0].id, addr[0].plugin, addr[0].addr, addr[0].addr_len, addr[0].session, atsi, 2);