From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS6Ve-0001W8-Td for qemu-devel@nongnu.org; Thu, 11 Sep 2014 11:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XS6VX-0005Hh-Tl for qemu-devel@nongnu.org; Thu, 11 Sep 2014 11:42:10 -0400 Received: from averel.grnet-hq.admin.grnet.gr ([195.251.29.3]:55835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS6VX-0005E8-N6 for qemu-devel@nongnu.org; Thu, 11 Sep 2014 11:42:03 -0400 From: Stratos Psomadakis Date: Thu, 11 Sep 2014 18:19:29 +0300 Message-Id: <1410448769-10495-3-git-send-email-psomas@grnet.gr> In-Reply-To: <1410448769-10495-1-git-send-email-psomas@grnet.gr> References: <1410448769-10495-1-git-send-email-psomas@grnet.gr> Subject: [Qemu-devel] [PATCH 2/2] iotests: Send the correct fd in socket_scm_helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: synnefo-devel@googlegroups.com 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 Signed-off-by: Dimitris Aragiorgis --- 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.7.10.4