static struct CadetTConnection *
get_ready_connection (struct CadetTunnel *t)
{
+ GNUNET_assert (GNUNET_YES == t->connection_ready_head->is_ready);
return t->connection_ready_head;
}
struct CadetTunnel *t = ct->t;
if (GNUNET_YES == ct->is_ready)
+ {
GNUNET_CONTAINER_DLL_remove (t->connection_ready_head,
t->connection_ready_tail,
ct);
+ t->num_ready_connections--;
+ }
else
+ {
GNUNET_CONTAINER_DLL_remove (t->connection_busy_head,
t->connection_busy_tail,
ct);
+ t->num_busy_connections--;
+ }
GNUNET_free (ct);
}
sqm.header.size = htons (sizeof (struct GNUNET_ATS_SessionQuotaMessage));
sqm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA);
sqm.quota = quota.value__;
- (void) send_with_session (n,
- &sqm,
- sizeof (sqm),
- UINT32_MAX - 1,
- GNUNET_TIME_UNIT_FOREVER_REL,
- GNUNET_NO,
- NULL, NULL);
+ if (NULL != n->primary_address.session)
+ (void) send_with_session (n,
+ &sqm,
+ sizeof (sqm),
+ UINT32_MAX - 1,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ GNUNET_NO,
+ NULL, NULL);
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Disconnecting peer `%4s' due to SET_QUOTA\n",
+ "Disconnecting peer `%s' due to SET_QUOTA\n",
GNUNET_i2s (&n->id));
if (GNUNET_YES == test_connected (n))
GNUNET_STATISTICS_update (GST_stats,