diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-19 10:13:21 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-19 10:13:21 +0000 |
commit | b67f6a9f90a9325f0d15b09bd5723878165fc9b3 (patch) | |
tree | 1841c6778abf17e55179529bed2ca09bd9e59e3f /usr.sbin | |
parent | 4d7b413950b93c44f0a9722f962708b91fbd723e (diff) |
do not signal "connection closed" upstream on EINTR/EAGAIN, from bgpd et al
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dvmrpd/control.c | 4 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/imsg.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/dvmrpd/control.c b/usr.sbin/dvmrpd/control.c index eb7ca83cb2a..f5825fd3408 100644 --- a/usr.sbin/dvmrpd/control.c +++ b/usr.sbin/dvmrpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.2 2007/01/23 17:42:33 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.3 2007/03/19 10:13:20 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -197,7 +197,7 @@ control_dispatch_imsg(int fd, short event, void *bula) 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/dvmrpd/imsg.c b/usr.sbin/dvmrpd/imsg.c index da001cec783..f086fa677f9 100644 --- a/usr.sbin/dvmrpd/imsg.c +++ b/usr.sbin/dvmrpd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.1 2006/06/01 14:12:20 norby Exp $ */ +/* $OpenBSD: imsg.c,v 1.2 2007/03/19 10:13:20 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -50,7 +50,7 @@ imsg_read(struct imsgbuf *ibuf) log_warn("imsg_read: pipe read error"); return (-1); } - return (0); + return (-2); } ibuf->r.wpos += n; |