summaryrefslogtreecommitdiff
path: root/usr.sbin/ripd/ripe.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ripd/ripe.c')
-rw-r--r--usr.sbin/ripd/ripe.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/ripd/ripe.c b/usr.sbin/ripd/ripe.c
index 3008edd90d5..61afe95d5de 100644
--- a/usr.sbin/ripd/ripe.c
+++ b/usr.sbin/ripd/ripe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ripe.c,v 1.33 2024/11/21 13:16:07 claudio Exp $ */
+/* $OpenBSD: ripe.c,v 1.34 2024/11/21 13:17:02 claudio Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -153,9 +153,9 @@ ripe(struct ripd_conf *xconf, int pipe_parent2ripe[2], int pipe_ripe2rde[2],
if ((iev_rde = malloc(sizeof(struct imsgev))) == NULL ||
(iev_main = malloc(sizeof(struct imsgev))) == NULL)
fatal(NULL);
- imsg_init(&iev_rde->ibuf, pipe_ripe2rde[0]);
+ imsgbuf_init(&iev_rde->ibuf, pipe_ripe2rde[0]);
iev_rde->handler = ripe_dispatch_rde;
- imsg_init(&iev_main->ibuf, pipe_parent2ripe[1]);
+ imsgbuf_init(&iev_main->ibuf, pipe_parent2ripe[1]);
iev_main->handler = ripe_dispatch_main;
/* setup event handler */
@@ -231,17 +231,17 @@ ripe_dispatch_main(int fd, short event, void *bula)
int link_ok, shut = 0;
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");
}
}
@@ -312,17 +312,17 @@ ripe_dispatch_rde(int fd, short event, void *bula)
int shut = 0;
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");
}
}
@@ -456,10 +456,10 @@ ripe_shutdown(void)
struct iface *iface;
/* close pipes */
- imsg_write(&iev_rde->ibuf);
+ imsgbuf_write(&iev_rde->ibuf);
msgbuf_clear(&iev_rde->ibuf.w);
close(iev_rde->ibuf.fd);
- imsg_write(&iev_main->ibuf);
+ imsgbuf_write(&iev_main->ibuf);
msgbuf_clear(&iev_main->ibuf.w);
close(iev_main->ibuf.fd);