From 4a55bfdfcf051f45619d422285be4b8c30ff20ae Mon Sep 17 00:00:00 2001 From: aliguori Date: Tue, 2 Dec 2008 20:02:14 +0000 Subject: [PATCH] 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). Signed-off-by: Ryan Harper Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5856 c046a42c-6fe2-441c-8c8c-71466251a162 --- vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnc.c b/vnc.c index 62dd317ec5..bd75854de9 100644 --- a/vnc.c +++ b/vnc.c @@ -2544,7 +2544,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); } -- 2.42.0