shutdown
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 20 Apr 2011 08:26:19 +0000 (08:26 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 20 Apr 2011 08:26:19 +0000 (08:26 +0000)
src/testing/test_testing_large_topology.c
src/testing/test_testing_topology.c
src/testing/testing.c
src/testing/testing_group.c

index 9f6b27059739a4507a21112181083f67e7acae5f..f9f4ff6fd8e85465a916f0f04346d2d463c5633a 100644 (file)
@@ -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)
index 2caa6f921af75ffc03f81a359966c83c845e40a1..fd6e1847ed7bbfa9028e437e24c7ada77477feef 100644 (file)
@@ -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)
index 024be6ff5561cf9fcbe1fe82d0184c16b6afbf74..9558f45eb287d297075d6d8cfc15ec2e1cc872f3 100644 (file)
@@ -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;
index b4ad6d9a439438ce8d927a11e66bee2183a807af..be9743b1f5b5ec2af46700e22f113bb4f435ea6a 100644 (file)
@@ -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;
     }