aboutsummaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-01-21 12:23:16 +0000
committerOmar Polo <op@omarpolo.com>2024-01-21 12:23:16 +0000
commitb03e976aa26d100ec1bf976dfdd005868395b490 (patch)
treea58e7f5dc66dc3f3f4f9a1178e34bc36d795440d /proc.c
parent6bce8180d96c2e1076bd131572979aae54a2fa9f (diff)
convert to use imsg_get_fd()
since proc_forward_imsg() never forwards a file descriptor (it's never called actually) just use -1 there.
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proc.c b/proc.c
index def7b8c..50cabc7 100644
--- a/proc.c
+++ b/proc.c
@@ -673,7 +673,7 @@ proc_dispatch(int fd, short event, void *arg)
case IMSG_CTL_PROCFD:
IMSG_SIZE_CHECK(&imsg, &pf);
memcpy(&pf, imsg.data, sizeof(pf));
- proc_accept(ps, imsg.fd, pf.pf_procid,
+ proc_accept(ps, imsg_get_fd(&imsg), pf.pf_procid,
pf.pf_instance);
break;
default:
@@ -804,7 +804,7 @@ proc_forward_imsg(struct privsep *ps, struct imsg *imsg,
enum privsep_procid id, int n)
{
return (proc_compose_imsg(ps, id, n, imsg->hdr.type,
- imsg->hdr.peerid, imsg->fd, imsg->data, IMSG_DATA_SIZE(imsg)));
+ imsg->hdr.peerid, -1, imsg->data, IMSG_DATA_SIZE(imsg)));
}
struct imsgbuf *