projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bc5d62
)
Allow multiple timeouts to expire at the exact same time.
author
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 29 Nov 2012 11:37:04 +0000
(12:37 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 29 Nov 2012 11:37:04 +0000
(12:37 +0100)
src/event.c
patch
|
blob
|
history
diff --git
a/src/event.c
b/src/event.c
index
6827dc0
..
71213bc
100644
(file)
--- a/
src/event.c
+++ b/
src/event.c
@@
-36,7
+36,7
@@
static int io_compare(const io_t *a, const io_t *b) {
static int timeout_compare(const timeout_t *a, const timeout_t *b) {
struct timeval diff;
timersub(&a->tv, &b->tv, &diff);
- return diff.tv_sec ?: diff.tv_usec;
+ return diff.tv_sec ?: diff.tv_usec
?: a < b ? -1 : a > b ? 1 : 0
;
}
static int signal_compare(const signal_t *a, const signal_t *b) {