summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2014-07-12 14:15:05 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2014-07-12 14:15:05 +0000
commit9a339ed374fcd1d2ddee8ca367012e77328ffccf (patch)
treed62687863811ef17ae105c2bc8bd3827e5a57500
parentf479879fcfd6acb471625d4c33aa47514c0ce75b (diff)
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.c4
-rw-r--r--usr.sbin/snmpd/control.c4
-rw-r--r--usr.sbin/snmpd/proc.c4
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);
}