/**
- * Handler for #GNUNET_MESSAGE_TYPE_TESTBED_PEER_CREATE_SUCCESS message from
+ * Handler for #GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS message from
* controller (testbed service)
*
* @param c the controller handle
{
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",
/* 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);
+ }
}
disconnect_and_schedule_reconnect (h);
break;
}
- if (bytes_physical >= bytes_msg)
+ if (bytes_physical > bytes_msg)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Overhead for %u byte message was %u\n",