projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c81d28
)
Fixed comparison to get correct timeout values
author
Matthias Wachs
<wachs@net.in.tum.de>
Tue, 26 Oct 2010 16:24:50 +0000
(16:24 +0000)
committer
Matthias Wachs
<wachs@net.in.tum.de>
Tue, 26 Oct 2010 16:24:50 +0000
(16:24 +0000)
th->timeout is absolut value, duration was relative, so comparison was never true
src/transport/transport_api.c
patch
|
blob
|
history
diff --git
a/src/transport/transport_api.c
b/src/transport/transport_api.c
index 0ea1705ae68e916ed19609b00e6f4c9927ae58c7..f1c0657802d7b5f3c59eeb349a8549d6785829bd 100644
(file)
--- a/
src/transport/transport_api.c
+++ b/
src/transport/transport_api.c
@@
-464,7
+464,8
@@
schedule_peer_transmission (struct GNUNET_TRANSPORT_Handle *h)
/* check outgoing quota */
duration = GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker,
th->notify_size - sizeof (struct OutboundMessage));
- if (th->timeout.value < duration.value)
+ struct GNUNET_TIME_Absolute duration_abs = GNUNET_TIME_relative_to_absolute (duration);
+ if (th->timeout.value < duration_abs.value)
{
/* signal timeout! */
#if DEBUG_TRANSPORT