aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ats/gnunet-service-ats_addresses.c7
-rw-r--r--src/ats/gnunet-service-ats_addresses.h1
-rw-r--r--src/ats/gnunet-service-ats_performance.c3
3 files changed, 8 insertions, 3 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index d081eb4215..dcf56d8282 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -1156,7 +1156,7 @@ peerinfo_it (void *cls,
struct GNUNET_ATS_Information *ats;
uint32_t ats_count;
- if ((NULL != pi_ctx->it) && (GNUNET_YES == addr->used))
+ if (NULL != pi_ctx->it)
{
ats_count = assemble_ats_information (addr, &ats);
@@ -1164,6 +1164,7 @@ peerinfo_it (void *cls,
&addr->peer,
addr->plugin,
addr->addr, addr->addr_len,
+ addr->active,
ats, ats_count,
addr->assigned_bw_out,
addr->assigned_bw_in);
@@ -1187,6 +1188,8 @@ GAS_addresses_get_peer_info (const struct GNUNET_PeerIdentity *peer, GNUNET_ATS_
struct GNUNET_BANDWIDTH_Value32NBO zero_bw;
GNUNET_assert (NULL != peer);
GNUNET_assert (NULL != addresses);
+ if (NULL == pi_it)
+ return; /* does not make sense without callback */
zero_bw = GNUNET_BANDWIDTH_value_init (0);
pi_ctx.it = pi_it;
@@ -1195,7 +1198,7 @@ GAS_addresses_get_peer_info (const struct GNUNET_PeerIdentity *peer, GNUNET_ATS_
GNUNET_CONTAINER_multihashmap_get_multiple (addresses, &peer->hashPubKey, &peerinfo_it, &pi_ctx);
if (NULL != pi_it)
- pi_it (pi_it_cls, NULL, NULL, NULL, 0, NULL, 0, zero_bw, zero_bw);
+ pi_it (pi_it_cls, NULL, NULL, NULL, 0, GNUNET_NO, NULL, 0, zero_bw, zero_bw);
}
diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h
index 7b602e10da..a570ba66c3 100644
--- a/src/ats/gnunet-service-ats_addresses.h
+++ b/src/ats/gnunet-service-ats_addresses.h
@@ -180,6 +180,7 @@ typedef void (*GNUNET_ATS_PeerInfo_Iterator) (void *p_it_cls,
const struct GNUNET_PeerIdentity *id,
const char *plugin_name,
const void *plugin_addr, size_t plugin_addr_len,
+ const int address_active,
const struct GNUNET_ATS_Information *atsi,
uint32_t atsi_count,
struct GNUNET_BANDWIDTH_Value32NBO
diff --git a/src/ats/gnunet-service-ats_performance.c b/src/ats/gnunet-service-ats_performance.c
index 7800ea46e2..4e4c3b8a8f 100644
--- a/src/ats/gnunet-service-ats_performance.c
+++ b/src/ats/gnunet-service-ats_performance.c
@@ -220,6 +220,7 @@ peerinfo_it (void *cls,
const struct GNUNET_PeerIdentity *id,
const char *plugin_name,
const void *plugin_addr, size_t plugin_addr_len,
+ const int active,
const struct GNUNET_ATS_Information *atsi,
uint32_t atsi_count,
struct GNUNET_BANDWIDTH_Value32NBO
@@ -298,7 +299,7 @@ GAS_handle_request_address_list (void *cls, struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
struct PerformanceClient *pc;
- struct AddressListRequestMessage * alrm = cls;
+ struct AddressListRequestMessage * alrm = (struct AddressListRequestMessage *) message;
struct GNUNET_PeerIdentity allzeros;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n",