aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-11 17:33:19 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-11 17:34:52 +0200
commit23ba4747d17a0d89aa3c0b661a102f01216427fd (patch)
treed8a41fbc003a693f003eb2253383ff90cd842067
parent163d0ea85b99a2c581b1f861bf9445a9a14bfc6f (diff)
select.c: Make the ugly hacker uglier...0.1.4
Right now I'm seeing crashes when removing a link and deleting it and I need this hack to make it not crash. We will have to understand if llist_for_each_entry_safe has a bug or if we are doing something bad with the list (anchors not properly initialized).
-rw-r--r--src/select.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c
index 9517778..2f6afa7 100644
--- a/src/select.c
+++ b/src/select.c
@@ -121,7 +121,8 @@ restart:
/* ugly, ugly hack. If more than one filedescriptors were
* unregistered, they might have been consecutive and
* llist_for_each_entry_safe() is no longer safe */
- if (unregistered_count > 1)
+ /* this seems to happen with the last element of the list as well */
+ if (unregistered_count >= 1)
goto restart;
}
return work;