diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-04-20 08:26:19 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-04-20 08:26:19 +0000 |
commit | 46aedb2a4c5ada8aa2fff6a4b860b1300ab7303f (patch) | |
tree | 6e07ad71afee0c1666076dbdd9e7c5a28b24dbed /src/testing | |
parent | e027e2d0362fc9ebff1c679bbc50425a5d0db3f9 (diff) | |
download | gnunet-46aedb2a4c5ada8aa2fff6a4b860b1300ab7303f.tar.gz gnunet-46aedb2a4c5ada8aa2fff6a4b860b1300ab7303f.zip |
shutdown
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/test_testing_large_topology.c | 2 | ||||
-rw-r--r-- | src/testing/test_testing_topology.c | 2 | ||||
-rw-r--r-- | src/testing/testing.c | 6 | ||||
-rw-r--r-- | src/testing/testing_group.c | 14 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/testing/test_testing_large_topology.c b/src/testing/test_testing_large_topology.c index 9f6b27059..f9f4ff6fd 100644 --- a/src/testing/test_testing_large_topology.c +++ b/src/testing/test_testing_large_topology.c | |||
@@ -592,7 +592,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
592 | topology_connections = 0; | 592 | topology_connections = 0; |
593 | GNUNET_TESTING_get_topology (pg, &topology_cb, NULL); | 593 | GNUNET_TESTING_get_topology (pg, &topology_cb, NULL); |
594 | } | 594 | } |
595 | if ((tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) || (cls == NULL)) | 595 | if (( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)|| (cls == NULL)) |
596 | return; | 596 | return; |
597 | 597 | ||
598 | if (die_task == GNUNET_SCHEDULER_NO_TASK) | 598 | if (die_task == GNUNET_SCHEDULER_NO_TASK) |
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c index 2caa6f921..fd6e1847e 100644 --- a/src/testing/test_testing_topology.c +++ b/src/testing/test_testing_topology.c | |||
@@ -635,7 +635,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
635 | topology_connections = 0; | 635 | topology_connections = 0; |
636 | GNUNET_TESTING_get_topology (pg, &topology_cb, NULL); | 636 | GNUNET_TESTING_get_topology (pg, &topology_cb, NULL); |
637 | } | 637 | } |
638 | if ((tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) || (cls == NULL)) | 638 | if (( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)|| (cls == NULL)) |
639 | return; | 639 | return; |
640 | 640 | ||
641 | if (die_task == GNUNET_SCHEDULER_NO_TASK) | 641 | if (die_task == GNUNET_SCHEDULER_NO_TASK) |
diff --git a/src/testing/testing.c b/src/testing/testing.c index 024be6ff5..9558f45eb 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -1617,7 +1617,7 @@ notify_connect_result (void *cls, | |||
1617 | ctx->connect_request_handle = NULL; | 1617 | ctx->connect_request_handle = NULL; |
1618 | } | 1618 | } |
1619 | 1619 | ||
1620 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 1620 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
1621 | { | 1621 | { |
1622 | if (ctx->d1th != NULL) | 1622 | if (ctx->d1th != NULL) |
1623 | GNUNET_TRANSPORT_disconnect (ctx->d1th); | 1623 | GNUNET_TRANSPORT_disconnect (ctx->d1th); |
@@ -1765,7 +1765,7 @@ send_hello (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1765 | struct ConnectContext *ctx = cls; | 1765 | struct ConnectContext *ctx = cls; |
1766 | struct GNUNET_MessageHeader *hello; | 1766 | struct GNUNET_MessageHeader *hello; |
1767 | ctx->hello_send_task = GNUNET_SCHEDULER_NO_TASK; | 1767 | ctx->hello_send_task = GNUNET_SCHEDULER_NO_TASK; |
1768 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 1768 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
1769 | return; | 1769 | return; |
1770 | if ((ctx->d1core_ready == GNUNET_YES) && (ctx->d2->hello != NULL) | 1770 | if ((ctx->d1core_ready == GNUNET_YES) && (ctx->d2->hello != NULL) |
1771 | && (NULL != GNUNET_HELLO_get_header (ctx->d2->hello)) | 1771 | && (NULL != GNUNET_HELLO_get_header (ctx->d2->hello)) |
@@ -1844,7 +1844,7 @@ reattempt_daemons_connect (void *cls, | |||
1844 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 1844 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
1845 | { | 1845 | { |
1846 | struct ConnectContext *ctx = cls; | 1846 | struct ConnectContext *ctx = cls; |
1847 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 1847 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
1848 | { | 1848 | { |
1849 | GNUNET_free(ctx); | 1849 | GNUNET_free(ctx); |
1850 | return; | 1850 | return; |
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index b4ad6d9a4..be9743b1f 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c | |||
@@ -3388,7 +3388,7 @@ hello_sent_callback (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
3388 | { | 3388 | { |
3389 | struct SendHelloContext *send_hello_context = cls; | 3389 | struct SendHelloContext *send_hello_context = cls; |
3390 | //unsigned int pg_iter; | 3390 | //unsigned int pg_iter; |
3391 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 3391 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
3392 | { | 3392 | { |
3393 | GNUNET_free(send_hello_context); | 3393 | GNUNET_free(send_hello_context); |
3394 | return; | 3394 | return; |
@@ -3446,7 +3446,7 @@ static void schedule_send_hellos (void *cls, const struct GNUNET_SCHEDULER_TaskC | |||
3446 | struct SendHelloContext *send_hello_context = cls; | 3446 | struct SendHelloContext *send_hello_context = cls; |
3447 | struct GNUNET_TESTING_PeerGroup *pg = send_hello_context->pg; | 3447 | struct GNUNET_TESTING_PeerGroup *pg = send_hello_context->pg; |
3448 | 3448 | ||
3449 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 3449 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
3450 | { | 3450 | { |
3451 | GNUNET_free(send_hello_context); | 3451 | GNUNET_free(send_hello_context); |
3452 | return; | 3452 | return; |
@@ -3574,7 +3574,7 @@ schedule_connect(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
3574 | struct ConnectContext *connect_context = cls; | 3574 | struct ConnectContext *connect_context = cls; |
3575 | struct GNUNET_TESTING_PeerGroup *pg = connect_context->ct_ctx->pg; | 3575 | struct GNUNET_TESTING_PeerGroup *pg = connect_context->ct_ctx->pg; |
3576 | 3576 | ||
3577 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 3577 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
3578 | return; | 3578 | return; |
3579 | 3579 | ||
3580 | if ((pg->outstanding_connects > pg->max_outstanding_connections) | 3580 | if ((pg->outstanding_connects > pg->max_outstanding_connections) |
@@ -4801,7 +4801,7 @@ schedule_get_topology(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
4801 | struct CoreContext *core_context = cls; | 4801 | struct CoreContext *core_context = cls; |
4802 | struct TopologyIterateContext *topology_context = | 4802 | struct TopologyIterateContext *topology_context = |
4803 | (struct TopologyIterateContext *) core_context->iter_context; | 4803 | (struct TopologyIterateContext *) core_context->iter_context; |
4804 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 4804 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
4805 | return; | 4805 | return; |
4806 | 4806 | ||
4807 | if (topology_context->connected | 4807 | if (topology_context->connected |
@@ -4945,7 +4945,7 @@ schedule_get_statistics(void *cls, | |||
4945 | struct StatsIterateContext *stats_context = | 4945 | struct StatsIterateContext *stats_context = |
4946 | (struct StatsIterateContext *) core_context->iter_context; | 4946 | (struct StatsIterateContext *) core_context->iter_context; |
4947 | 4947 | ||
4948 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 4948 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
4949 | return; | 4949 | return; |
4950 | 4950 | ||
4951 | if (stats_context->connected > stats_context->pg->max_outstanding_connections) | 4951 | if (stats_context->connected > stats_context->pg->max_outstanding_connections) |
@@ -5427,7 +5427,7 @@ internal_continue_startup(void *cls, | |||
5427 | { | 5427 | { |
5428 | struct InternalStartContext *internal_context = cls; | 5428 | struct InternalStartContext *internal_context = cls; |
5429 | 5429 | ||
5430 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 5430 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
5431 | { | 5431 | { |
5432 | return; | 5432 | return; |
5433 | } | 5433 | } |
@@ -5540,7 +5540,7 @@ internal_start(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
5540 | { | 5540 | { |
5541 | struct InternalStartContext *internal_context = cls; | 5541 | struct InternalStartContext *internal_context = cls; |
5542 | 5542 | ||
5543 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 5543 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
5544 | { | 5544 | { |
5545 | return; | 5545 | return; |
5546 | } | 5546 | } |