summaryrefslogtreecommitdiffstats
path: root/sysdep/unix
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-12-12 17:48:03 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-12-12 17:48:03 +0100
commit35164c501722f07beef21178b19090fa9d1930cd (patch)
tree1d8c9e0f1046a6744ab1fa92e3065266d780b05b /sysdep/unix
parentd6a836f8d673a117fd19136d24e98fa9bbc4b27e (diff)
downloadbird-35164c501722f07beef21178b19090fa9d1930cd.tar
bird-35164c501722f07beef21178b19090fa9d1930cd.zip
rx_hook may be cleaned in some callback so we check it before
executing sk_read().
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 5aed1b2..b6c7f84 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -1372,14 +1372,14 @@ io_loop(void)
{
sock *s = current_sock;
int e;
- if (FD_ISSET(s->fd, &rd))
+ if (FD_ISSET(s->fd, &rd) && s->rx_hook)
do
{
e = sk_read(s);
if (s != current_sock)
goto next;
}
- while (e);
+ while (e && s->rx_hook);
if (FD_ISSET(s->fd, &wr))
do
{