[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33667 - gnunet/src/ats-tool
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33667 - gnunet/src/ats-tool |
Date: |
Mon, 16 Jun 2014 10:23:46 +0200 |
Author: grothoff
Date: 2014-06-16 10:23:46 +0200 (Mon, 16 Jun 2014)
New Revision: 33667
Modified:
gnunet/src/ats-tool/gnunet-ats.c
Log:
print active/inactive information
Modified: gnunet/src/ats-tool/gnunet-ats.c
===================================================================
--- gnunet/src/ats-tool/gnunet-ats.c 2014-06-16 08:20:16 UTC (rev 33666)
+++ gnunet/src/ats-tool/gnunet-ats.c 2014-06-16 08:23:46 UTC (rev 33667)
@@ -209,6 +209,12 @@
* Current inbound bandwidth.
*/
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
+
+ /**
+ * Is this an active address?
+ */
+ int active;
+
};
@@ -375,7 +381,7 @@
return;
}
- ats_str = GNUNET_strdup ("");
+ ats_str = GNUNET_strdup (pr->active ? _("active ") : _("inactive "));
network = GNUNET_ATS_NET_UNSPECIFIED;
for (c = 0; c < pr->ats_count; c++)
{
@@ -538,7 +544,8 @@
if ((NULL != actx.res))
{
if ((bandwidth_in.value__ == actx.res->bandwidth_in.value__) &&
- (bandwidth_out.value__ == actx.res->bandwidth_out.value__))
+ (bandwidth_out.value__ == actx.res->bandwidth_out.value__) &&
+ (active == actx.res->active))
{
return; /* Nothing to do here */
}
@@ -551,9 +558,11 @@
else
{
a = GNUNET_new (struct ATSAddress);
+
a->address = GNUNET_HELLO_address_copy(address);
a->bandwidth_in = bandwidth_in;
a->bandwidth_out = bandwidth_out;
+ a->active = active;
GNUNET_CONTAINER_multipeermap_put (addresses,
&address->peer,
a,
@@ -571,6 +580,7 @@
pr->address = GNUNET_HELLO_address_copy (address);
pr->bandwidth_in = bandwidth_in;
pr->bandwidth_out = bandwidth_out;
+ pr->active = active;
pr->tats_ctx = GNUNET_TRANSPORT_address_to_string (cfg, address,
resolve_addresses_numeric,
GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
@@ -802,7 +812,9 @@
}
alh = GNUNET_ATS_performance_list_addresses (ph,
- (NULL == pid_str) ? NULL : &pid, GNUNET_YES, ats_perf_cb, NULL);
+ (NULL == pid_str) ? NULL :
&pid,
+ GNUNET_YES,
+ &ats_perf_cb, NULL);
if (NULL == alh)
{
FPRINTF (stderr,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33667 - gnunet/src/ats-tool,
gnunet <=