]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
rx_hook may be cleaned in some callback so we check it before
authorOndrej Zajicek <santiago@crfreenet.org>
Fri, 12 Dec 2008 16:48:03 +0000 (17:48 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Fri, 12 Dec 2008 16:48:03 +0000 (17:48 +0100)
executing sk_read().

sysdep/unix/io.c

index 5aed1b22bf7055c92306e890783293f517cf0d25..b6c7f8468d580fa50838cc73e41b732fa701de1c 100644 (file)
@@ -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
                  {