summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_neighbours.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-11-01 20:32:17 +0000
committerChristian Grothoff <christian@grothoff.org>2015-11-01 20:32:17 +0000
commit6eb3af83223615b90f649b87ac5d4fbd473528f7 (patch)
treebac2825da821e2e57c564e1bbccfbcf8b5cbee1b /src/transport/gnunet-service-transport_neighbours.c
parentcd1a8c319e890e69a6260a6ae99d1023fc6d49ac (diff)
-typo-doxygen
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 9f4982b67..0e53f9b6f 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -3673,6 +3673,7 @@ GST_neighbours_handle_quota_message (const struct GNUNET_PeerIdentity *peer,
{
struct NeighbourMapEntry *n;
const struct GNUNET_ATS_SessionQuotaMessage *sqm;
+ struct GNUNET_BANDWIDTH_Value32NBO last;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received QUOTA message from peer `%s'\n",
@@ -3696,10 +3697,13 @@ GST_neighbours_handle_quota_message (const struct GNUNET_PeerIdentity *peer,
/* gone already */
return;
}
- n->neighbour_receive_quota
- = GNUNET_BANDWIDTH_value_max (GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
- GNUNET_BANDWIDTH_value_init (ntohl (sqm->quota)));
- send_outbound_quota_to_clients (n);
+ last = GNUNET_BANDWIDTH_value_max (GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
+ GNUNET_BANDWIDTH_value_init (ntohl (sqm->quota)));
+ if (last.value__ != n->neighbour_receive_quota.value__)
+ {
+ n->neighbour_receive_quota = last;
+ send_outbound_quota_to_clients (n);
+ }
}