qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 17/22] iotests: Send the correct fd in socket_scm_hel


From: Kevin Wolf
Subject: [Qemu-devel] [PULL 17/22] iotests: Send the correct fd in socket_scm_helper
Date: Fri, 12 Sep 2014 17:57:01 +0200

From: Stratos Psomadakis <address@hidden>

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 <address@hidden>
Signed-off-by: Dimitris Aragiorgis <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 tests/qemu-iotests/socket_scm_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/socket_scm_helper.c 
b/tests/qemu-iotests/socket_scm_helper.c
index 0e2b285..8195983 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);
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]