}
static NTSTATUS smbd_direct_daemon_send_fd(
- struct smb_direct_daemon_state *daemon_state, int fd);
+ struct smb_direct_daemon_conn *conn, int fd);
static void smbd_direct_daemon_listen_accept_done(struct tevent_req *subreq)
{
fd, print_sockaddr(laddr_buf, sizeof(laddr_buf), &laddr),
print_sockaddr(raddr_buf, sizeof(raddr_buf), &raddr));
- status = smbd_direct_daemon_send_fd(daemon_state, fd);
+ status = smbd_direct_daemon_send_fd(conn, fd);
close(fd);
}
static NTSTATUS smbd_direct_daemon_send_fd(
- struct smb_direct_daemon_state *daemon_state, int fd)
+ struct smb_direct_daemon_conn *conn, int fd)
{
struct msghdr msg;
struct iovec iov;
uint8_t buf[fdlen];
msghdr_prep_fds(&msg, buf, fdlen, &fd, 1);
- ret = sendmsg(daemon_state->listening_conn->conn_fd, &msg, 0);
+ ret = sendmsg(conn->conn_fd, &msg, 0);
if (ret == -1) {
DBG_ERR("BUGBUGBUG: this should be an async func\n");
return NT_STATUS_INTERNAL_ERROR;