qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Exclude unix: from vnc call to unix_listen()
@ 2008-12-01 20:58 Ryan Harper
  2008-12-02 20:02 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Ryan Harper @ 2008-12-01 20:58 UTC (permalink / raw)
  To: qemu-devel; +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 <ryanh@us.ibm.com>

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-02 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-01 20:58 [Qemu-devel] [PATCH] Exclude unix: from vnc call to unix_listen() Ryan Harper
2008-12-02 20:02 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).