Commit be2bfb9d authored by Stratos Psomadakis's avatar Stratos Psomadakis Committed by Kevin Wolf
Browse files

iotests: Send the correct fd in socket_scm_helper



Make sure to pass the correct fd via SCM_RIGHTS in socket_scm_helper.c
(i.e. fd_to_send, not socket-fd).

Signed-off-by: default avatarStratos Psomadakis <psomas@grnet.gr>
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 48f364dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ static int send_fd(int fd, int fd_to_send)
    cmsg->cmsg_len = CMSG_LEN(sizeof(int));
    cmsg->cmsg_level = SOL_SOCKET;
    cmsg->cmsg_type = SCM_RIGHTS;
    memcpy(CMSG_DATA(cmsg), &fd, sizeof(int));
    memcpy(CMSG_DATA(cmsg), &fd_to_send, sizeof(int));

    do {
        ret = sendmsg(fd, &msg, 0);