diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2013-11-15 12:30:20 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2013-11-15 12:30:20 +0000 |
commit | 6bda15a807e1ebc9064d568162acd3ce624c1139 (patch) | |
tree | 03ba9d5f2ac94a3f21d78850524895dddbc0fe9b | |
parent | 1de351bfefe8ba5a99c1e4f39c28f48c9f174fde (diff) |
Cope with the EAGAIN API change for msgbuf_write()
-rw-r--r-- | sbin/iked/control.c | 4 | ||||
-rw-r--r-- | sbin/iked/proc.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sbin/iked/control.c b/sbin/iked/control.c index 2793b89a45e..ae63780994d 100644 --- a/sbin/iked/control.c +++ b/sbin/iked/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.12 2013/03/21 04:30:14 deraadt Exp $ */ +/* $OpenBSD: control.c,v 1.13 2013/11/15 12:30:19 mikeb Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -249,7 +249,7 @@ control_dispatch_imsg(int fd, short event, void *arg) } break; case EV_WRITE: - if (msgbuf_write(&c->iev.ibuf.w) < 0) { + if (msgbuf_write(&c->iev.ibuf.w) <= 0 && errno != EAGAIN) { control_close(fd, cs); return; } diff --git a/sbin/iked/proc.c b/sbin/iked/proc.c index d8c02fd031d..424e03c086f 100644 --- a/sbin/iked/proc.c +++ b/sbin/iked/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.9 2013/03/21 04:30:14 deraadt Exp $ */ +/* $OpenBSD: proc.c,v 1.10 2013/11/15 12:30:19 mikeb Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -307,7 +307,7 @@ proc_dispatch(int fd, short event, void *arg) } if (event & EV_WRITE) { - if (msgbuf_write(&ibuf->w) == -1) + if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN) fatal(title); } |