From 6bda15a807e1ebc9064d568162acd3ce624c1139 Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Fri, 15 Nov 2013 12:30:20 +0000 Subject: Cope with the EAGAIN API change for msgbuf_write() --- sbin/iked/control.c | 4 ++-- 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 @@ -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 @@ -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); } -- cgit v1.2.3