qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] Exclude unix: from vnc call to unix_listen()


From: Ryan Harper
Subject: [Qemu-devel] [PATCH] Exclude unix: from vnc call to unix_listen()
Date: Mon, 1 Dec 2008 14:58:07 -0600
User-agent: Mutt/1.5.6+20040907i

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
address@hidden


---
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 <address@hidden>

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);
         }




reply via email to

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