Skip to content

Commit

Permalink
iotests: Send the correct fd in socket_scm_helper
Browse files Browse the repository at this point in the history
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: Stratos Psomadakis <psomas@grnet.gr>
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
Stratos Psomadakis authored and kevmw committed Sep 12, 2014
1 parent 48f364d commit be2bfb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/qemu-iotests/socket_scm_helper.c
Expand Up @@ -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);
Expand Down

0 comments on commit be2bfb9

Please sign in to comment.