-/* $OpenBSD: engine.c,v 1.21 2022/10/15 13:26:15 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.22 2023/12/14 11:09:34 claudio Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
fatalx("%s: received unexpected imsg fd "
"to engine", __func__);
- if ((fd = imsg.fd) == -1)
+ if ((fd = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg fd to "
"engine but didn't receive any", __func__);
-/* $OpenBSD: frontend.c,v 1.42 2022/12/28 21:30:18 jmc Exp $ */
+/* $OpenBSD: frontend.c,v 1.43 2023/12/14 11:09:34 claudio Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
if (iev_engine)
fatalx("%s: received unexpected imsg fd to "
"frontend", __func__);
- if ((fd = imsg.fd) == -1)
+ if ((fd = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg fd to "
"frontend but didn't receive any",
__func__);
nconf = NULL;
break;
case IMSG_ICMP6SOCK:
- if ((icmp6sock = imsg.fd) == -1)
+ if ((icmp6sock = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg "
"ICMPv6 fd but didn't receive any",
__func__);
if (routesock != -1)
fatalx("%s: received unexpected routesock fd",
__func__);
- if ((routesock = imsg.fd) == -1)
+ if ((routesock = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg "
"routesocket fd but didn't receive any",
__func__);
frontend_startup();
break;
case IMSG_CONTROLFD:
- if ((fd = imsg.fd) == -1)
+ if ((fd = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg "
"control fd but didn't receive any",
__func__);