From: Matthias Wachs Date: Wed, 20 Apr 2011 08:26:19 +0000 (+0000) Subject: shutdown X-Git-Tag: initial-import-from-subversion-38251~18641 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=46aedb2a4c5ada8aa2fff6a4b860b1300ab7303f;p=oweals%2Fgnunet.git shutdown --- 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) topology_connections = 0; GNUNET_TESTING_get_topology (pg, &topology_cb, NULL); } - if ((tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) || (cls == NULL)) + if (( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)|| (cls == NULL)) return; 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) topology_connections = 0; GNUNET_TESTING_get_topology (pg, &topology_cb, NULL); } - if ((tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) || (cls == NULL)) + if (( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)|| (cls == NULL)) return; 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, ctx->connect_request_handle = NULL; } - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) { if (ctx->d1th != NULL) GNUNET_TRANSPORT_disconnect (ctx->d1th); @@ -1765,7 +1765,7 @@ send_hello (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) struct ConnectContext *ctx = cls; struct GNUNET_MessageHeader *hello; ctx->hello_send_task = GNUNET_SCHEDULER_NO_TASK; - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) return; if ((ctx->d1core_ready == GNUNET_YES) && (ctx->d2->hello != NULL) && (NULL != GNUNET_HELLO_get_header (ctx->d2->hello)) @@ -1844,7 +1844,7 @@ reattempt_daemons_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct ConnectContext *ctx = cls; - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) { GNUNET_free(ctx); 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) { struct SendHelloContext *send_hello_context = cls; //unsigned int pg_iter; - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) { GNUNET_free(send_hello_context); return; @@ -3446,7 +3446,7 @@ static void schedule_send_hellos (void *cls, const struct GNUNET_SCHEDULER_TaskC struct SendHelloContext *send_hello_context = cls; struct GNUNET_TESTING_PeerGroup *pg = send_hello_context->pg; - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) { GNUNET_free(send_hello_context); return; @@ -3574,7 +3574,7 @@ schedule_connect(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) struct ConnectContext *connect_context = cls; struct GNUNET_TESTING_PeerGroup *pg = connect_context->ct_ctx->pg; - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) return; if ((pg->outstanding_connects > pg->max_outstanding_connections) @@ -4801,7 +4801,7 @@ schedule_get_topology(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) struct CoreContext *core_context = cls; struct TopologyIterateContext *topology_context = (struct TopologyIterateContext *) core_context->iter_context; - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) return; if (topology_context->connected @@ -4945,7 +4945,7 @@ schedule_get_statistics(void *cls, struct StatsIterateContext *stats_context = (struct StatsIterateContext *) core_context->iter_context; - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) return; if (stats_context->connected > stats_context->pg->max_outstanding_connections) @@ -5427,7 +5427,7 @@ internal_continue_startup(void *cls, { struct InternalStartContext *internal_context = cls; - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) { return; } @@ -5540,7 +5540,7 @@ internal_start(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct InternalStartContext *internal_context = cls; - if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) + if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) { return; }