diff options
-rw-r--r-- | usr.sbin/hoststated/control.c | 4 | ||||
-rw-r--r-- | usr.sbin/hoststated/imsg.c | 4 | ||||
-rw-r--r-- | usr.sbin/relayd/control.c | 4 | ||||
-rw-r--r-- | usr.sbin/relayd/imsg.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/hoststated/control.c b/usr.sbin/hoststated/control.c index bfd318f45ea..f758ee4a6b8 100644 --- a/usr.sbin/hoststated/control.c +++ b/usr.sbin/hoststated/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.13 2007/02/08 13:32:24 reyk Exp $ */ +/* $OpenBSD: control.c,v 1.14 2007/03/19 10:11:59 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -191,7 +191,7 @@ control_dispatch_imsg(int fd, short event, void *arg) switch (event) { case EV_READ: - if ((n = imsg_read(&c->ibuf)) <= 0) { + if ((n = imsg_read(&c->ibuf)) == -1 || n == 0) { control_close(fd); return; } diff --git a/usr.sbin/hoststated/imsg.c b/usr.sbin/hoststated/imsg.c index 83d633e2dc1..4b21fbe0934 100644 --- a/usr.sbin/hoststated/imsg.c +++ b/usr.sbin/hoststated/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.5 2007/01/29 14:23:31 pyr Exp $ */ +/* $OpenBSD: imsg.c,v 1.6 2007/03/19 10:11:59 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -55,7 +55,7 @@ imsg_read(struct imsgbuf *ibuf) log_warn("imsg_read: pipe read error"); return (-1); } - return (0); + return (-2); } ibuf->r.wpos += n; diff --git a/usr.sbin/relayd/control.c b/usr.sbin/relayd/control.c index bfd318f45ea..f758ee4a6b8 100644 --- a/usr.sbin/relayd/control.c +++ b/usr.sbin/relayd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.13 2007/02/08 13:32:24 reyk Exp $ */ +/* $OpenBSD: control.c,v 1.14 2007/03/19 10:11:59 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -191,7 +191,7 @@ control_dispatch_imsg(int fd, short event, void *arg) switch (event) { case EV_READ: - if ((n = imsg_read(&c->ibuf)) <= 0) { + if ((n = imsg_read(&c->ibuf)) == -1 || n == 0) { control_close(fd); return; } diff --git a/usr.sbin/relayd/imsg.c b/usr.sbin/relayd/imsg.c index 83d633e2dc1..4b21fbe0934 100644 --- a/usr.sbin/relayd/imsg.c +++ b/usr.sbin/relayd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.5 2007/01/29 14:23:31 pyr Exp $ */ +/* $OpenBSD: imsg.c,v 1.6 2007/03/19 10:11:59 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -55,7 +55,7 @@ imsg_read(struct imsgbuf *ibuf) log_warn("imsg_read: pipe read error"); return (-1); } - return (0); + return (-2); } ibuf->r.wpos += n; |