From: Ondrej Zajicek Date: Fri, 12 Dec 2008 16:48:03 +0000 (+0100) Subject: rx_hook may be cleaned in some callback so we check it before X-Git-Tag: v1.2.0~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35164c501722f07beef21178b19090fa9d1930cd;p=thirdparty%2Fbird.git rx_hook may be cleaned in some callback so we check it before executing sk_read(). --- diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 5aed1b22b..b6c7f8468 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 {