struct ConnectTopologyContext *ct_ctx = connect_ctx->ct_ctx;
struct GNUNET_TESTING_PeerGroup *pg = ct_ctx->pg;
struct PeerConnection *connection;
+
+ GNUNET_assert (0 < pg->outstanding_connects);
pg->outstanding_connects--;
/*
if (connection != NULL) /* Can safely remove! */
{
+ GNUNET_assert (0 < ct_ctx->remaining_connections);
ct_ctx->remaining_connections--;
if (pg->notify_connection != NULL) /* Notify of reverse connection */
pg->notify_connection (pg->notify_connection_cls, second, first,
if (ct_ctx->remaining_connections == 0)
{
if (ct_ctx->notify_connections_done != NULL)
- ct_ctx->notify_connections_done (ct_ctx->notify_cls, NULL);
+ {
+ ct_ctx->notify_connections_done (ct_ctx->notify_cls, NULL);
+ ct_ctx->notify_connections_done = NULL;
+ }
}
else
preschedule_connect (pg);