[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/43] vnc: fix "info vnc" with "-vnc ..., reverse=o
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 04/43] vnc: fix "info vnc" with "-vnc ..., reverse=on" |
Date: |
Mon, 3 Dec 2012 16:08:28 -0600 |
From: Paolo Bonzini <address@hidden>
When reverse connection is in use, there is no active VNC server
socket. Because of this, getsockopt(-1, ...) is attempted and
the following error is emitted:
$ socat TCP-LISTEN:5900,reuseaddr TCP-LISTEN:5901,reuseaddr &
$ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:5900,reverse -monitor
stdio
QEMU 1.2.50 monitor - type 'help' for more information
(qemu) info vnc
An undefined error has occurred
Because however the host, family, service and auth fields are
optional, we can just exit if there is no active server socket.
$ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:5900,reverse -monitor
stdio
QEMU 1.2.50 monitor - type 'help' for more information
(qemu) info vnc
Server:
Client:
address: 127.0.0.1:5900
x509_dname: none
username: none
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
(cherry picked from commit 417b0b88904fe1dd8c41bff8092dfbab0134d9cb)
Signed-off-by: Michael Roth <address@hidden>
---
ui/vnc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ui/vnc.c b/ui/vnc.c
index 18ec101..66ae930 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -372,6 +372,10 @@ VncInfo *qmp_query_vnc(Error **errp)
}
}
+ if (vnc_display->lsock == -1) {
+ return info;
+ }
+
if (getsockname(vnc_display->lsock, (struct sockaddr *)&sa,
&salen) == -1) {
error_set(errp, QERR_UNDEFINED_ERROR);
--
1.7.9.5
- [Qemu-devel] Patch Round-up for stable 1.2.2, freeze Wednesday, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 02/43] fix CONFIG_QEMU_HELPERDIR generation again, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 03/43] ui/vnc: Only report/use TIGHT_PNG encoding if enabled., Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 01/43] configure: Fix CONFIG_QEMU_HELPERDIR generation, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 04/43] vnc: fix "info vnc" with "-vnc ..., reverse=on",
Michael Roth <=
- [Qemu-devel] [PATCH 05/43] uhci: Raise interrupt when requested even for non active tds, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 07/43] qxl: always update displaysurface on resize, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 06/43] hw/qxl: qxl_dirty_surfaces: use uintptr_t, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 08/43] rtc: fix overflow in mktimegm, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 10/43] target-i386: Allow tsc-frequency to be larger then 2.147G, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 09/43] hw: Fix return value check for bdrv_read, bdrv_write, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 12/43] memory: fix rendering of a region obscured by another, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 13/43] s390x: fix -initrd in virtio machine, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 11/43] e1000: drop check_rxov, always treat RX ring with RDH == RDT as empty, Michael Roth, 2012/12/03
- [Qemu-devel] [PATCH 15/43] target-sparc64: disable VGA cirrus, Michael Roth, 2012/12/03