public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.1.2-gentoo commit in: ui/
@ 2013-01-19  3:47 Doug Goldstein
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Goldstein @ 2013-01-19  3:47 UTC (permalink / raw
  To: gentoo-commits

commit:     c625b1377a341f9cd0045064b254f1d7daedbb3e
Author:     Paolo Bonzini <pbonzini <AT> redhat <DOT> com>
AuthorDate: Wed Oct 10 12:30:58 2012 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Wed Nov 21 21:22:30 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=c625b137

vnc: fix "info vnc" with "-vnc ..., reverse=on"

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 <pbonzini <AT> redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha <AT> redhat.com>
(cherry picked from commit 417b0b88904fe1dd8c41bff8092dfbab0134d9cb)

---
 ui/vnc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index 8cec55f..a61e569 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -371,6 +371,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);


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

* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.1.2-gentoo commit in: ui/
@ 2013-01-19  3:47 Doug Goldstein
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Goldstein @ 2013-01-19  3:47 UTC (permalink / raw
  To: gentoo-commits

commit:     cae7a173ae473e299c4c5dd81220422f3dd44f4d
Author:     Joel Martin <github <AT> martintribe <DOT> org>
AuthorDate: Wed May 16 12:54:25 2012 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Wed Nov 21 21:22:01 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=cae7a173

ui/vnc: Only report/use TIGHT_PNG encoding if enabled.

If TIGHT_PNG is not enabled by the --enable-vnc-png configure flag
then do not report to the client that it is supported.

Also, since TIGHT_PNG is the same as the TIGHT encoding but with the
filter/copy replaced with PNG data, adding it to the supported
encodings list when it is disabled will cause the TIGHT encoding to be
used even though the client requested TIGHT_PNG.

Signed-off-by: Joel Martin <github <AT> martintribe.org>
Signed-off-by: Stefan Hajnoczi <stefanha <AT> redhat.com>
(cherry picked from commit fe3e7f2dc05225cdd2ba40defcd4e2581bebc5e0)

---
 ui/vnc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index 54bc5ad..8cec55f 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1818,10 +1818,12 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
             vs->features |= VNC_FEATURE_TIGHT_MASK;
             vs->vnc_encoding = enc;
             break;
+#ifdef CONFIG_VNC_PNG
         case VNC_ENCODING_TIGHT_PNG:
             vs->features |= VNC_FEATURE_TIGHT_PNG_MASK;
             vs->vnc_encoding = enc;
             break;
+#endif
         case VNC_ENCODING_ZLIB:
             vs->features |= VNC_FEATURE_ZLIB_MASK;
             vs->vnc_encoding = enc;


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

end of thread, other threads:[~2013-01-19  3:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-19  3:47 [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.1.2-gentoo commit in: ui/ Doug Goldstein
  -- strict thread matches above, loose matches on Subject: below --
2013-01-19  3:47 Doug Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox