From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7FqO-0004MV-2m for qemu-devel@nongnu.org; Mon, 01 Dec 2008 15:58:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7FqN-0004Lx-7d for qemu-devel@nongnu.org; Mon, 01 Dec 2008 15:58:11 -0500 Received: from [199.232.76.173] (port=36232 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7FqN-0004Ls-3K for qemu-devel@nongnu.org; Mon, 01 Dec 2008 15:58:11 -0500 Received: from e6.ny.us.ibm.com ([32.97.182.146]:45155) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L7FqM-0006jA-IZ for qemu-devel@nongnu.org; Mon, 01 Dec 2008 15:58:10 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id mB1KvZJZ025863 for ; Mon, 1 Dec 2008 15:57:35 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id mB1Kw8UP196866 for ; Mon, 1 Dec 2008 15:58:08 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id mB1Kw8od010420 for ; Mon, 1 Dec 2008 15:58:08 -0500 Date: Mon, 1 Dec 2008 14:58:07 -0600 From: Ryan Harper Message-ID: <20081201205807.GA13481@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] Exclude unix: from vnc call to unix_listen() Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann When using an existing unix socket like: -vnc unix:/tmp/file1Y2nY2 qemu fails to bind a unix socket because the vnc call to unix_listen includes the unix: prefix and stores that in the unix.sun_path. The fix is to not pass in unix: for the filename (same way qemu-char.c does it). -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryand@us.ibm.com --- When using an existing unix socket like: -vnc unix:/tmp/file1Y2nY2 qemu fails to bind a unix socket because the vnc call to unix_listen includes the unix: prefix and stores that in the unix.sun_path. The fix is to not pass in unix: for the filename (same way qemu-char.c does it). Signed-off-by: Ryan Harper diff --git a/vnc.c b/vnc.c index f663b38..c0e591c 100644 --- a/vnc.c +++ b/vnc.c @@ -2413,7 +2413,7 @@ int vnc_display_open(DisplayState *ds, const char *display) dpy = qemu_malloc(256); if (strncmp(display, "unix:", 5) == 0) { strcpy(dpy, "unix:"); - vs->lsock = unix_listen(display, dpy+5, 256-5); + vs->lsock = unix_listen(display+5, dpy+5, 256-5); } else { vs->lsock = inet_listen(display, dpy, 256, SOCK_STREAM, 5900); }