commit f790bd20460f2d9937915f0d2268035f910c296a
parent 246107de5371746690554b7a8a5206fc702a0907
Author: Matthias Wachs <wachs@net.in.tum.de>
Date: Mon, 16 Sep 2013 11:54:42 +0000
add disconnect message
Diffstat:
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
@@ -775,7 +775,7 @@ GAS_addresses_add (struct GAS_Addresses_Handle *handle,
uint32_t previous_session;
int c1;
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received `%s' for peer `%s'\n",
"ADDRESS ADD",
GNUNET_i2s (peer));
@@ -1678,7 +1678,8 @@ bandwidth_changed_cb (void *cls, struct ATS_Address *address)
GNUNET_assert (handle != NULL);
GNUNET_assert (address != NULL);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Bandwidth assignment changed for peer %s \n", GNUNET_i2s(&address->peer));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Bandwidth assignment changed for peer %s \n",
+ GNUNET_i2s(&address->peer));
/* Notify performance clients about changes to address */
GAS_performance_notify_all_clients (&address->peer,
@@ -1702,8 +1703,21 @@ bandwidth_changed_cb (void *cls, struct ATS_Address *address)
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Sending bandwidth update for peer `%s'\n",GNUNET_i2s (&address->peer));
+ if ((0 == ntohl (address->assigned_bw_in.value__)) &&
+ (0 == ntohl (address->assigned_bw_out.value__)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Telling transport to disconnect peer `%s'\n",
+ GNUNET_i2s (&address->peer));
+ }
+ else
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Sending bandwidth update for peer `%s': %llu %llu\n",
+ GNUNET_i2s (&address->peer),
+ address->assigned_bw_out,
+ address->assigned_bw_out);
+ }
/* *Notify scheduling clients about suggestion */
GAS_scheduling_transmit_address_suggestion (&address->peer,