GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
int may_drop)
{
- struct TransportClient *tc;
int done;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
(unsigned int) ntohs (msg->type),
(unsigned int) ntohs (msg->size));
done = GNUNET_NO;
- for (tc = clients_head; NULL != tc; tc = tc->next)
+ for (struct TransportClient *tc = clients_head;
+ NULL != tc;
+ tc = tc->next)
{
if ( (GNUNET_YES == may_drop) &&
(CT_CORE != tc->type) )
{
struct GNUNET_MQ_Envelope *env;
struct PeerIterateResponseMessage *msg;
- struct TransportClient *tc;
-
+
msg = compose_address_iterate_response_message (peer,
address);
msg->state = htonl (state);
msg->state_timeout = GNUNET_TIME_absolute_hton (state_timeout);
- for (tc = clients_head; NULL != tc; tc = tc->next)
+ for (struct TransportClient *tc = clients_head;
+ NULL != tc;
+ tc = tc->next)
{
if (CT_MONITOR != tc->type)
continue;
struct GNUNET_TIME_Absolute timeout)
{
if (GNUNET_TRANSPORT_is_connected (s) &&
- ! GNUNET_TRANSPORT_is_connected (n->state) )
+ (! GNUNET_TRANSPORT_is_connected (n->state)) )
{
neighbours_connect_notification (n);
GNUNET_STATISTICS_set (GST_stats,
++neighbours_connected,
GNUNET_NO);
}
- if (! GNUNET_TRANSPORT_is_connected (s) &&
- GNUNET_TRANSPORT_is_connected (n->state) )
+ if ((! GNUNET_TRANSPORT_is_connected (s)) &&
+ GNUNET_TRANSPORT_is_connected (n->state) )
{
GNUNET_STATISTICS_set (GST_stats,
gettext_noop ("# peers connected"),
}
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multipeermap_remove (neighbours,
- &n->id, n));
+ &n->id,
+ n));
/* Cancel address requests for this peer */
if (NULL != n->suggest_handle)
struct GNUNET_TRANSPORT_CoreHandle *h = cls;
struct Neighbour *n;
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Receiving SET_QUOTA message for `%s' with quota %u\n",
+ GNUNET_i2s (&qm->peer),
+ ntohl (qm->quota.value__));
n = neighbour_find (h,
&qm->peer);
if (NULL == n)
{
- GNUNET_break (0);
+ GNUNET_break (0); /* FIXME: julius reports this assertion fails sometimes? */
disconnect_and_schedule_reconnect (h);
return;
}
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Receiving SET_QUOTA message for `%s' with quota %u\n",
- GNUNET_i2s (&qm->peer),
- ntohl (qm->quota.value__));
GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker,
qm->quota);
}