-/* $OpenBSD: engine.c,v 1.85 2023/04/30 13:08:40 phessler Exp $ */
+/* $OpenBSD: engine.c,v 1.86 2023/12/14 09:58:59 claudio Exp $ */
/*
* Copyright (c) 2017 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.64 2022/07/12 16:54:59 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.65 2023/12/14 09:58:59 claudio Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
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__);
event_add(&iev_engine->ev, 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__);
set_icmp6sock(icmp6sock, rdomain);
break;
case IMSG_ROUTESOCK:
- if ((fd = imsg.fd) == -1)
+ if ((fd = imsg_get_fd(&imsg)) == -1)
fatalx("%s: expected to receive imsg "
"routesocket fd but didn't receive any",
__func__);
break;
#ifndef SMALL
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__);