summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/socket_scm_helper.c
diff options
context:
space:
mode:
authorStratos Psomadakis <psomas@grnet.gr>2014-09-11 18:19:29 +0300
committerKevin Wolf <kwolf@redhat.com>2014-09-12 10:27:54 +0200
commitbe2bfb9dbde59de27684623b9d8261262c5ad076 (patch)
treecab27d8abeb200051a31122af58717113563d068 /tests/qemu-iotests/socket_scm_helper.c
parent48f364dd0ba8d6323ee9ac2b35996eef667bac39 (diff)
downloadqemu-be2bfb9dbde59de27684623b9d8261262c5ad076.zip
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: Stratos Psomadakis <psomas@grnet.gr> Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/socket_scm_helper.c')
-rw-r--r--tests/qemu-iotests/socket_scm_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qemu-iotests/socket_scm_helper.c b/tests/qemu-iotests/socket_scm_helper.c
index 0e2b2859af..81959835eb 100644
--- a/tests/qemu-iotests/socket_scm_helper.c
+++ b/tests/qemu-iotests/socket_scm_helper.c
@@ -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);