timeout
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 20 Apr 2011 08:29:52 +0000 (08:29 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 20 Apr 2011 08:29:52 +0000 (08:29 +0000)
src/dht/gnunet-dht-driver.c
src/dht/test_dht_api.c

index c09ac9ad0308ea9eb0e64ae51656d3ab944303f7..2010326e6fe61eeab0b9dd13eb94220ebabd961f 100644 (file)
@@ -2042,7 +2042,7 @@ get_stop_task(void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
 {
   struct TestGetContext *test_get = cls;
 
-  if (tc->reason == GNUNET_SCHEDULER_REASON_TIMEOUT)
+  if ( (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT) != 0)
     gets_failed++;
   else
     cumulative_successful_gets++;
@@ -2180,7 +2180,7 @@ put_finished(void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
   outstanding_puts--;
   puts_completed++;
 
-  if (tc->reason == GNUNET_SCHEDULER_REASON_TIMEOUT)
+  if ( (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT) != 0)
     fprintf (stderr, "PUT Request failed!\n");
 
   /* Reset the daemon (which peer to insert at) for later put request iterations */
index 49dae12171037ef241d733b5b5d809614552a72b..5ae53b1f01f1a93770b00808b1bf1d65c3a52d71 100644 (file)
@@ -169,7 +169,7 @@ test_find_peer_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct PeerContext *peer = cls;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_find_peer_stop!\n");
-  if (tc->reason == GNUNET_SCHEDULER_REASON_TIMEOUT)
+  if ( (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT) != 0)
     {
       GNUNET_break (0);
       GNUNET_SCHEDULER_cancel (die_task);
@@ -348,7 +348,7 @@ test_get_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct PeerContext *peer = cls;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_get_stop!\n");
-  if (tc->reason == GNUNET_SCHEDULER_REASON_TIMEOUT)
+  if ( (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT) != 0)
     {
       GNUNET_break (0);
       GNUNET_SCHEDULER_cancel (die_task);