diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:10:58 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:10:58 +0000 |
commit | 6b0deb304b4f88788be43f9b689c006766cd0a30 (patch) | |
tree | 1a802a41ec15d85e5161dce51b6ab0c5ca229038 /sbin/iked | |
parent | a423251e6ce072befee8d8b94b6a46d5438768d3 (diff) |
Introduce imsg_write() and use it instead of msgbuf_write().
imsg_write() is just a thin wrapper around msgbuf_write(). So this is
mostly search and replace.
OK tb@
Diffstat (limited to 'sbin/iked')
-rw-r--r-- | sbin/iked/control.c | 4 | ||||
-rw-r--r-- | sbin/iked/proc.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sbin/iked/control.c b/sbin/iked/control.c index f37d4867e6a..518d4c69be3 100644 --- a/sbin/iked/control.c +++ b/sbin/iked/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.39 2024/05/21 05:00:47 jsg Exp $ */ +/* $OpenBSD: control.c,v 1.40 2024/11/21 13:10:22 claudio Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -268,7 +268,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 (imsg_write(&c->iev.ibuf) <= 0 && errno != EAGAIN) { control_close(fd, cs); return; } diff --git a/sbin/iked/proc.c b/sbin/iked/proc.c index 29c74825fca..3799601a716 100644 --- a/sbin/iked/proc.c +++ b/sbin/iked/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.45 2024/11/21 13:06:19 claudio Exp $ */ +/* $OpenBSD: proc.c,v 1.46 2024/11/21 13:10:22 claudio Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org> @@ -627,8 +627,8 @@ proc_dispatch(int fd, short event, void *arg) } if (event & EV_WRITE) { - if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN) - fatal("%s: msgbuf_write", __func__); + if ((n = imsg_write(ibuf)) == -1 && errno != EAGAIN) + fatal("%s: imsg_write", __func__); if (n == 0) { /* this pipe is dead, so remove the event handler */ event_del(&iev->ev); |