summaryrefslogtreecommitdiff
path: root/sbin/slaacd/slaacd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/slaacd/slaacd.c')
-rw-r--r--sbin/slaacd/slaacd.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sbin/slaacd/slaacd.c b/sbin/slaacd/slaacd.c
index b53371de7cb..71e43759814 100644
--- a/sbin/slaacd/slaacd.c
+++ b/sbin/slaacd/slaacd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slaacd.c,v 1.74 2024/11/21 13:14:44 claudio Exp $ */
+/* $OpenBSD: slaacd.c,v 1.75 2024/11/21 13:17:01 claudio Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -230,9 +230,9 @@ main(int argc, char *argv[])
if ((iev_frontend = malloc(sizeof(struct imsgev))) == NULL ||
(iev_engine = malloc(sizeof(struct imsgev))) == NULL)
fatal(NULL);
- imsg_init(&iev_frontend->ibuf, pipe_main2frontend[0]);
+ imsgbuf_init(&iev_frontend->ibuf, pipe_main2frontend[0]);
iev_frontend->handler = main_dispatch_frontend;
- imsg_init(&iev_engine->ibuf, pipe_main2engine[0]);
+ imsgbuf_init(&iev_engine->ibuf, pipe_main2engine[0]);
iev_engine->handler = main_dispatch_engine;
/* Setup event handlers for pipes to engine & frontend. */
@@ -391,17 +391,17 @@ main_dispatch_frontend(int fd, short event, void *bula)
ibuf = &iev->ibuf;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
- fatal("imsg_read error");
+ if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN)
+ fatal("imsgbuf_read error");
if (n == 0) /* Connection closed. */
shut = 1;
}
if (event & EV_WRITE) {
- if (imsg_write(ibuf) == -1) {
+ if (imsgbuf_write(ibuf) == -1) {
if (errno == EPIPE) /* Connection closed. */
shut = 1;
else
- fatal("imsg_write");
+ fatal("imsgbuf_write");
}
}
@@ -472,17 +472,17 @@ main_dispatch_engine(int fd, short event, void *bula)
ibuf = &iev->ibuf;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
- fatal("imsg_read error");
+ if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN)
+ fatal("imsgbuf_read error");
if (n == 0) /* Connection closed. */
shut = 1;
}
if (event & EV_WRITE) {
- if (imsg_write(ibuf) == -1) {
+ if (imsgbuf_write(ibuf) == -1) {
if (errno == EPIPE) /* Connection closed. */
shut = 1;
else
- fatal("imsg_write");
+ fatal("imsgbuf_write");
}
}
@@ -614,11 +614,11 @@ main_imsg_send_ipc_sockets(struct imsgbuf *frontend_buf,
if (imsg_compose(frontend_buf, IMSG_SOCKET_IPC, 0, 0,
pipe_frontend2engine[0], NULL, 0) == -1)
return (-1);
- imsg_flush(frontend_buf);
+ imsgbuf_flush(frontend_buf);
if (imsg_compose(engine_buf, IMSG_SOCKET_IPC, 0, 0,
pipe_frontend2engine[1], NULL, 0) == -1)
return (-1);
- imsg_flush(engine_buf);
+ imsgbuf_flush(engine_buf);
return (0);
}