aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c12
-rw-r--r--src/transport/transport_api.c2
2 files changed, 9 insertions, 5 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,
3673{ 3673{
3674 struct NeighbourMapEntry *n; 3674 struct NeighbourMapEntry *n;
3675 const struct GNUNET_ATS_SessionQuotaMessage *sqm; 3675 const struct GNUNET_ATS_SessionQuotaMessage *sqm;
3676 struct GNUNET_BANDWIDTH_Value32NBO last;
3676 3677
3677 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3678 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3678 "Received QUOTA message from peer `%s'\n", 3679 "Received QUOTA message from peer `%s'\n",
@@ -3696,10 +3697,13 @@ GST_neighbours_handle_quota_message (const struct GNUNET_PeerIdentity *peer,
3696 /* gone already */ 3697 /* gone already */
3697 return; 3698 return;
3698 } 3699 }
3699 n->neighbour_receive_quota 3700 last = GNUNET_BANDWIDTH_value_max (GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
3700 = GNUNET_BANDWIDTH_value_max (GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT, 3701 GNUNET_BANDWIDTH_value_init (ntohl (sqm->quota)));
3701 GNUNET_BANDWIDTH_value_init (ntohl (sqm->quota))); 3702 if (last.value__ != n->neighbour_receive_quota.value__)
3702 send_outbound_quota_to_clients (n); 3703 {
3704 n->neighbour_receive_quota = last;
3705 send_outbound_quota_to_clients (n);
3706 }
3703} 3707}
3704 3708
3705 3709
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index 95eeb8788..29416b03d 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -778,7 +778,7 @@ demultiplexer (void *cls,
778 disconnect_and_schedule_reconnect (h); 778 disconnect_and_schedule_reconnect (h);
779 break; 779 break;
780 } 780 }
781 if (bytes_physical >= bytes_msg) 781 if (bytes_physical > bytes_msg)
782 { 782 {
783 LOG (GNUNET_ERROR_TYPE_DEBUG, 783 LOG (GNUNET_ERROR_TYPE_DEBUG,
784 "Overhead for %u byte message was %u\n", 784 "Overhead for %u byte message was %u\n",