diff options
author | 2014-07-12 14:15:04 +0000 | |
---|---|---|
committer | 2014-07-12 14:15:04 +0000 | |
commit | 2b721f231f4c9963f5fc1edb23211ebb0094c642 (patch) | |
tree | c1d0c9eb9e2ab07de3c030830edc0d38c8356d6d | |
parent | - fill in cninit to enable rts (diff) | |
download | wireguard-openbsd-2b721f231f4c9963f5fc1edb23211ebb0094c642.tar.xz wireguard-openbsd-2b721f231f4c9963f5fc1edb23211ebb0094c642.zip |
Sync msgbuf_write() changes from relayd.
Please note that proc.c should be kept identical in relayd, iked and
snmpd (currently without the includes).
ok benno@
-rw-r--r-- | sbin/iked/proc.c | 4 | ||||
-rw-r--r-- | usr.sbin/snmpd/control.c | 4 | ||||
-rw-r--r-- | usr.sbin/snmpd/proc.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sbin/iked/proc.c b/sbin/iked/proc.c index 37a9d149c75..5fc1b6fdac9 100644 --- a/sbin/iked/proc.c +++ b/sbin/iked/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.17 2014/05/08 13:11:16 blambert Exp $ */ +/* $OpenBSD: proc.c,v 1.18 2014/07/12 14:15:04 reyk Exp $ */ /* * Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -464,7 +464,7 @@ proc_dispatch(int fd, short event, void *arg) } if (event & EV_WRITE) { - if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) fatal(title); } diff --git a/usr.sbin/snmpd/control.c b/usr.sbin/snmpd/control.c index 8e613a2ba25..686ca47c7a6 100644 --- a/usr.sbin/snmpd/control.c +++ b/usr.sbin/snmpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.25 2014/06/03 06:25:47 yasuoka Exp $ */ +/* $OpenBSD: control.c,v 1.26 2014/07/12 14:15:04 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -238,7 +238,7 @@ control_dispatch_imsg(int fd, short event, void *arg) } } if (event & EV_WRITE) { - if (msgbuf_write(&c->iev.ibuf.w) < 0 && errno != EAGAIN) { + if (msgbuf_write(&c->iev.ibuf.w) <= 0 && errno != EAGAIN) { control_close(c); return; } diff --git a/usr.sbin/snmpd/proc.c b/usr.sbin/snmpd/proc.c index c10dcd09c37..5f692fcad0d 100644 --- a/usr.sbin/snmpd/proc.c +++ b/usr.sbin/snmpd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.9 2014/05/08 13:04:28 blambert Exp $ */ +/* $OpenBSD: proc.c,v 1.10 2014/07/12 14:15:04 reyk Exp $ */ /* * Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -464,7 +464,7 @@ proc_dispatch(int fd, short event, void *arg) } if (event & EV_WRITE) { - if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) fatal(title); } |