Skip to contentSkip to conversation

[5856] Exclude unix: from vnc call to unix_listen() (Ryan Harper)

Qemu-devel Anthony Liguori 1 participant 1 message Dec 2, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5856

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5856
Author:   aliguori
Date:     2008-12-02 20:02:14 +0000 (Tue, 02 Dec 2008)

Log Message:
-----------
Exclude unix: from vnc call to unix_listen() (Ryan Harper)

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).

Modified Paths:
--------------
trunk/vnc.c

Modified: trunk/vnc.c
===================================================================

vnc.c +1 -1
@@ -2544,7 +2544,7 @@
         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);
         }