diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-04-27 22:39:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-04-27 22:39:58 +0000 |
commit | 51cf325a1426c55bc573b3624185353327bb78e1 (patch) | |
tree | 2cf914cfe6448ebddc478122379d2327e1135d28 /src | |
parent | f03afa0234a6046165fe642e38acfdcfb9123f83 (diff) | |
download | gnunet-51cf325a1426c55bc573b3624185353327bb78e1.tar.gz gnunet-51cf325a1426c55bc573b3624185353327bb78e1.zip |
assertions that Nate should agree with
Diffstat (limited to 'src')
-rw-r--r-- | src/testing/testing_group.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index be9743b1f..b1e3beb8c 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c | |||
@@ -3514,6 +3514,8 @@ internal_connect_notify(void *cls, const struct GNUNET_PeerIdentity *first, | |||
3514 | struct ConnectTopologyContext *ct_ctx = connect_ctx->ct_ctx; | 3514 | struct ConnectTopologyContext *ct_ctx = connect_ctx->ct_ctx; |
3515 | struct GNUNET_TESTING_PeerGroup *pg = ct_ctx->pg; | 3515 | struct GNUNET_TESTING_PeerGroup *pg = ct_ctx->pg; |
3516 | struct PeerConnection *connection; | 3516 | struct PeerConnection *connection; |
3517 | |||
3518 | GNUNET_assert (0 < pg->outstanding_connects); | ||
3517 | pg->outstanding_connects--; | 3519 | pg->outstanding_connects--; |
3518 | 3520 | ||
3519 | /* | 3521 | /* |
@@ -3535,6 +3537,7 @@ internal_connect_notify(void *cls, const struct GNUNET_PeerIdentity *first, | |||
3535 | 3537 | ||
3536 | if (connection != NULL) /* Can safely remove! */ | 3538 | if (connection != NULL) /* Can safely remove! */ |
3537 | { | 3539 | { |
3540 | GNUNET_assert (0 < ct_ctx->remaining_connections); | ||
3538 | ct_ctx->remaining_connections--; | 3541 | ct_ctx->remaining_connections--; |
3539 | if (pg->notify_connection != NULL) /* Notify of reverse connection */ | 3542 | if (pg->notify_connection != NULL) /* Notify of reverse connection */ |
3540 | pg->notify_connection (pg->notify_connection_cls, second, first, | 3543 | pg->notify_connection (pg->notify_connection_cls, second, first, |
@@ -3548,7 +3551,10 @@ internal_connect_notify(void *cls, const struct GNUNET_PeerIdentity *first, | |||
3548 | if (ct_ctx->remaining_connections == 0) | 3551 | if (ct_ctx->remaining_connections == 0) |
3549 | { | 3552 | { |
3550 | if (ct_ctx->notify_connections_done != NULL) | 3553 | if (ct_ctx->notify_connections_done != NULL) |
3551 | ct_ctx->notify_connections_done (ct_ctx->notify_cls, NULL); | 3554 | { |
3555 | ct_ctx->notify_connections_done (ct_ctx->notify_cls, NULL); | ||
3556 | ct_ctx->notify_connections_done = NULL; | ||
3557 | } | ||
3552 | } | 3558 | } |
3553 | else | 3559 | else |
3554 | preschedule_connect (pg); | 3560 | preschedule_connect (pg); |