size_t msgbufsize = msghdr_prep_recv_fds(NULL, NULL, 0, INT8_MAX);
uint8_t msgbuf[msgbufsize];
uint8_t buf[MESSAGING_DGM_FRAGMENT_LENGTH];
+ size_t num_fds;
messaging_dgm_validate(ctx);
return;
}
- {
- size_t num_fds = msghdr_extract_fds(&msg, NULL, 0);
+ num_fds = msghdr_extract_fds(&msg, NULL, 0);
+ if (num_fds == 0) {
+ int fds[1];
+
+ messaging_dgm_recv(ctx, ev, buf, received, fds, 0);
+ } else {
size_t i;
int fds[num_fds];
messaging_dgm_recv(ctx, ev, buf, received, fds, num_fds);
}
-
}
static int messaging_dgm_in_msg_destructor(struct messaging_dgm_in_msg *m)