diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-27 09:21:14 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-27 09:21:14 +0000 |
commit | 71f77f1be3d6e2da1b88fe4a4fdd44c3c69b5325 (patch) | |
tree | 5570130fdab90ad02f4b5bfda414d13161f0f3d1 /src/util/connection.c | |
parent | 1d7368a52af332af35ec6de22affef4f5f0c1da4 (diff) | |
download | gnunet-71f77f1be3d6e2da1b88fe4a4fdd44c3c69b5325.tar.gz gnunet-71f77f1be3d6e2da1b88fe4a4fdd44c3c69b5325.zip |
Changed GNUNET_TIME_Absolute and GNUNET_TIME_Relative to allow safe comparisons between time values
Diffstat (limited to 'src/util/connection.c')
-rw-r--r-- | src/util/connection.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/connection.c b/src/util/connection.c index 9e789eb58..ab04b13ef 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -1121,7 +1121,7 @@ receive_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1121 | return; | 1121 | return; |
1122 | } | 1122 | } |
1123 | now = GNUNET_TIME_absolute_get (); | 1123 | now = GNUNET_TIME_absolute_get (); |
1124 | if ((now.value > sh->receive_timeout.value) || | 1124 | if ((now.abs_value > sh->receive_timeout.abs_value) || |
1125 | (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT)) || | 1125 | (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT)) || |
1126 | (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))) | 1126 | (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))) |
1127 | { | 1127 | { |
@@ -1131,7 +1131,7 @@ receive_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1131 | "Receive from `%s' encounters error: time out by %llums... (%p)\n", | 1131 | "Receive from `%s' encounters error: time out by %llums... (%p)\n", |
1132 | GNUNET_a2s (sh->addr, sh->addrlen), | 1132 | GNUNET_a2s (sh->addr, sh->addrlen), |
1133 | GNUNET_TIME_absolute_get_duration (sh->receive_timeout). | 1133 | GNUNET_TIME_absolute_get_duration (sh->receive_timeout). |
1134 | value, sh); | 1134 | abs_value, sh); |
1135 | #endif | 1135 | #endif |
1136 | signal_timeout (sh); | 1136 | signal_timeout (sh); |
1137 | return; | 1137 | return; |
@@ -1200,7 +1200,7 @@ receive_again (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1200 | return; | 1200 | return; |
1201 | } | 1201 | } |
1202 | now = GNUNET_TIME_absolute_get (); | 1202 | now = GNUNET_TIME_absolute_get (); |
1203 | if ((now.value > sh->receive_timeout.value) || | 1203 | if ((now.abs_value > sh->receive_timeout.abs_value) || |
1204 | (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))) | 1204 | (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))) |
1205 | { | 1205 | { |
1206 | #if DEBUG_CONNECTION | 1206 | #if DEBUG_CONNECTION |