From: Matthias Wachs Date: Wed, 20 Apr 2011 08:29:52 +0000 (+0000) Subject: timeout X-Git-Tag: initial-import-from-subversion-38251~18640 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=167c1552f3db95705317f32e21f6cd73ef75c9c6;p=oweals%2Fgnunet.git timeout --- diff --git a/src/dht/gnunet-dht-driver.c b/src/dht/gnunet-dht-driver.c index c09ac9ad0..2010326e6 100644 --- a/src/dht/gnunet-dht-driver.c +++ b/src/dht/gnunet-dht-driver.c @@ -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 */ diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c index 49dae1217..5ae53b1f0 100644 --- a/src/dht/test_dht_api.c +++ b/src/dht/test_dht_api.c @@ -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);