qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/3] vnc patch queue
@ 2014-06-02 14:33 Gerd Hoffmann
  2014-06-02 15:09 ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2014-06-02 14:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Carrying three little patches.

please pull,
  Gerd

The following changes since commit 9bb931802e6ab5ab6947e3cb9cea934fc0724274:

  Revert "bsd-user: replace fprintf(stderr, ...) with error_report()" (2014-06-02 13:26:59 +0100)

are available in the git repository at:

  git://git.kraxel.org/qemu tags/pull-vnc-3

for you to fetch changes up to b52991537c0efe27ee0c1955eb28a4584226d8b5:

  vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16,24,32} (2014-06-02 16:30:52 +0200)

----------------------------------------------------------------
misc minor vnc patches

----------------------------------------------------------------
Gerd Hoffmann (2):
      vnc: refuse to set a password with VNC_AUTH_NONE
      vnc: add trace events for key events

Gonglei (1):
      vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16,24,32}

 trace-events       |  8 +++++++
 ui/vnc-enc-tight.c |  8 ++++++-
 ui/vnc.c           | 61 ++++++++++++++++++++++++++----------------------------
 3 files changed, 44 insertions(+), 33 deletions(-)

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

* Re: [Qemu-devel] [PULL 0/3] vnc patch queue
  2014-06-02 14:33 Gerd Hoffmann
@ 2014-06-02 15:09 ` Peter Maydell
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2014-06-02 15:09 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 2 June 2014 15:33, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> Carrying three little patches.
>
> please pull,
>   Gerd
>
> The following changes since commit 9bb931802e6ab5ab6947e3cb9cea934fc0724274:
>
>   Revert "bsd-user: replace fprintf(stderr, ...) with error_report()" (2014-06-02 13:26:59 +0100)
>
> are available in the git repository at:
>
>   git://git.kraxel.org/qemu tags/pull-vnc-3
>
> for you to fetch changes up to b52991537c0efe27ee0c1955eb28a4584226d8b5:
>
>   vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16,24,32} (2014-06-02 16:30:52 +0200)
>
> ----------------------------------------------------------------
> misc minor vnc patches


Applied, thanks.

-- PMM

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

* [Qemu-devel] [PULL 0/3] vnc patch queue
@ 2015-03-10 11:16 Gerd Hoffmann
  2015-03-10 11:16 ` [Qemu-devel] [PULL 1/3] vnc: set id at parse time not init time Gerd Hoffmann
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2015-03-10 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Here comes the vnc patch queue with a few vnc bugfixes.

please pull,
  Gerd

The following changes since commit 277263e1b320d759a760ba6c5ea75ec268f929e5:

  Merge remote-tracking branch 'remotes/agraf/tags/signed-ppc-for-upstream' into staging (2015-03-09 14:04:14 +0000)

are available in the git repository at:


  git://git.kraxel.org/qemu tags/pull-vnc-20150310-1

for you to fetch changes up to b57489cfe48f9fedc10205c0494f144085733f30:

  Fix crash when connecting to VNC through websocket (2015-03-10 11:33:42 +0100)

----------------------------------------------------------------
vnc bugfixes.

----------------------------------------------------------------
Gerd Hoffmann (2):
      vnc: set id at parse time not init time
      vnc: -readconfig fix

Jorge Acereda Maciá (1):
      Fix crash when connecting to VNC through websocket

 include/ui/console.h |  1 -
 qmp.c                |  1 -
 ui/vnc-ws.c          |  3 +--
 ui/vnc.c             | 22 ++++++++++++----------
 vl.c                 |  7 +++++--
 5 files changed, 18 insertions(+), 16 deletions(-)

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

* [Qemu-devel] [PULL 1/3] vnc: set id at parse time not init time
  2015-03-10 11:16 [Qemu-devel] [PULL 0/3] vnc patch queue Gerd Hoffmann
@ 2015-03-10 11:16 ` Gerd Hoffmann
  2015-03-10 11:16 ` [Qemu-devel] [PULL 2/3] vnc: -readconfig fix Gerd Hoffmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2015-03-10 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Anthony Liguori, Luiz Capitulino

This way the generated id will be stored in -writeconfig cfg files.
Also we can make vnc_auto_assign_id() local to vnc.c.

Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 include/ui/console.h |  1 -
 qmp.c                |  1 -
 ui/vnc.c             | 22 ++++++++++++----------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/ui/console.h b/include/ui/console.h
index 0f97d86..de88bba 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -335,7 +335,6 @@ void vnc_display_init(const char *id);
 void vnc_display_open(const char *id, Error **errp);
 void vnc_display_add_client(const char *id, int csock, bool skipauth);
 char *vnc_display_local_addr(const char *id);
-void vnc_auto_assign_id(QemuOptsList *olist, QemuOpts *opts);
 #ifdef CONFIG_VNC
 int vnc_display_password(const char *id, const char *password);
 int vnc_display_pw_expire(const char *id, time_t expires);
diff --git a/qmp.c b/qmp.c
index d701cff..c479e77 100644
--- a/qmp.c
+++ b/qmp.c
@@ -391,7 +391,6 @@ static void qmp_change_vnc_listen(const char *target, Error **errp)
         return;
     }
 
-    vnc_auto_assign_id(olist, opts);
     vnc_display_open("default", errp);
 }
 
diff --git a/ui/vnc.c b/ui/vnc.c
index 10a2724..ff0b5bd 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3687,12 +3687,7 @@ void vnc_display_add_client(const char *id, int csock, bool skipauth)
     vnc_connect(vs, csock, skipauth, false);
 }
 
-QemuOpts *vnc_parse_func(const char *str)
-{
-    return qemu_opts_parse(qemu_find_opts("vnc"), str, 1);
-}
-
-void vnc_auto_assign_id(QemuOptsList *olist, QemuOpts *opts)
+static void vnc_auto_assign_id(QemuOptsList *olist, QemuOpts *opts)
 {
     int i = 2;
     char *id;
@@ -3705,18 +3700,25 @@ void vnc_auto_assign_id(QemuOptsList *olist, QemuOpts *opts)
     qemu_opts_set_id(opts, id);
 }
 
-int vnc_init_func(QemuOpts *opts, void *opaque)
+QemuOpts *vnc_parse_func(const char *str)
 {
-    Error *local_err = NULL;
     QemuOptsList *olist = qemu_find_opts("vnc");
-    char *id = (char *)qemu_opts_id(opts);
+    QemuOpts *opts = qemu_opts_parse(olist, str, 1);
+    const char *id = qemu_opts_id(opts);
 
     if (!id) {
         /* auto-assign id if not present */
         vnc_auto_assign_id(olist, opts);
-        id = (char *)qemu_opts_id(opts);
     }
+    return opts;
+}
+
+int vnc_init_func(QemuOpts *opts, void *opaque)
+{
+    Error *local_err = NULL;
+    char *id = (char *)qemu_opts_id(opts);
 
+    assert(id);
     vnc_display_init(id);
     vnc_display_open(id, &local_err);
     if (local_err != NULL) {
-- 
1.8.3.1

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

* [Qemu-devel] [PULL 2/3] vnc: -readconfig fix
  2015-03-10 11:16 [Qemu-devel] [PULL 0/3] vnc patch queue Gerd Hoffmann
  2015-03-10 11:16 ` [Qemu-devel] [PULL 1/3] vnc: set id at parse time not init time Gerd Hoffmann
@ 2015-03-10 11:16 ` Gerd Hoffmann
  2015-03-10 11:16 ` [Qemu-devel] [PULL 3/3] Fix crash when connecting to VNC through websocket Gerd Hoffmann
  2015-03-11  8:44 ` [Qemu-devel] [PULL 0/3] vnc patch queue Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2015-03-10 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Gerd Hoffmann, Anthony Liguori

Now that -vnc goes through QemuOpts we can get vnc configuration
via -readconfig too.  So setting display_remote in the command
line parsing code doesn't cut it any more, we must check QemuOpts
instead to see whenever any vnc display is configured.

Reported-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 vl.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/vl.c b/vl.c
index b47e223..eba5d4c 100644
--- a/vl.c
+++ b/vl.c
@@ -2001,7 +2001,6 @@ static DisplayType select_display(const char *p)
     } else if (strstart(p, "vnc", &opts)) {
 #ifdef CONFIG_VNC
         if (*opts == '=') {
-            display_remote++;
             if (vnc_parse_func(opts+1) == NULL) {
                 exit(1);
             }
@@ -3477,7 +3476,6 @@ int main(int argc, char **argv, char **envp)
                 break;
             case QEMU_OPTION_vnc:
 #ifdef CONFIG_VNC
-                display_remote++;
                 if (vnc_parse_func(optarg) == NULL) {
                     exit(1);
                 }
@@ -3970,6 +3968,11 @@ int main(int argc, char **argv, char **envp)
         }
     }
 
+#if defined(CONFIG_VNC)
+    if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) {
+        display_remote++;
+    }
+#endif
     if (display_type == DT_DEFAULT && !display_remote) {
 #if defined(CONFIG_GTK)
         display_type = DT_GTK;
-- 
1.8.3.1

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

* [Qemu-devel] [PULL 3/3] Fix crash when connecting to VNC through websocket
  2015-03-10 11:16 [Qemu-devel] [PULL 0/3] vnc patch queue Gerd Hoffmann
  2015-03-10 11:16 ` [Qemu-devel] [PULL 1/3] vnc: set id at parse time not init time Gerd Hoffmann
  2015-03-10 11:16 ` [Qemu-devel] [PULL 2/3] vnc: -readconfig fix Gerd Hoffmann
@ 2015-03-10 11:16 ` Gerd Hoffmann
  2015-03-11  8:44 ` [Qemu-devel] [PULL 0/3] vnc patch queue Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2015-03-10 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jorge Acereda Maciá, Gerd Hoffmann, Anthony Liguori

From: Jorge Acereda Maciá <jacereda@gmail.com>

Connecting to VNC through websocket crashes in vnc_flush() when trying
to acquire a mutex that hasn't been initialized (vnc_init_state(vs)
hasn't been called at this point).

Signed-off-by: Jorge Acereda Macia <jacereda@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/vnc-ws.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ui/vnc-ws.c b/ui/vnc-ws.c
index e304baf..d75950d 100644
--- a/ui/vnc-ws.c
+++ b/ui/vnc-ws.c
@@ -207,8 +207,7 @@ static void vncws_send_handshake_response(VncState *vs, const char* key)
     }
 
     response = g_strdup_printf(WS_HANDSHAKE, accept);
-    vnc_write(vs, response, strlen(response));
-    vnc_flush(vs);
+    vnc_client_write_buf(vs, (const uint8_t *)response, strlen(response));
 
     g_free(accept);
     g_free(response);
-- 
1.8.3.1

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

* Re: [Qemu-devel] [PULL 0/3] vnc patch queue
  2015-03-10 11:16 [Qemu-devel] [PULL 0/3] vnc patch queue Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2015-03-10 11:16 ` [Qemu-devel] [PULL 3/3] Fix crash when connecting to VNC through websocket Gerd Hoffmann
@ 2015-03-11  8:44 ` Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2015-03-11  8:44 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 10 March 2015 at 11:16, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> Here comes the vnc patch queue with a few vnc bugfixes.
>
> please pull,
>   Gerd
>
> The following changes since commit 277263e1b320d759a760ba6c5ea75ec268f929e5:
>
>   Merge remote-tracking branch 'remotes/agraf/tags/signed-ppc-for-upstream' into staging (2015-03-09 14:04:14 +0000)
>
> are available in the git repository at:
>
>
>   git://git.kraxel.org/qemu tags/pull-vnc-20150310-1
>
> for you to fetch changes up to b57489cfe48f9fedc10205c0494f144085733f30:
>
>   Fix crash when connecting to VNC through websocket (2015-03-10 11:33:42 +0100)
>
> ----------------------------------------------------------------
> vnc bugfixes.

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2015-03-11  8:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-10 11:16 [Qemu-devel] [PULL 0/3] vnc patch queue Gerd Hoffmann
2015-03-10 11:16 ` [Qemu-devel] [PULL 1/3] vnc: set id at parse time not init time Gerd Hoffmann
2015-03-10 11:16 ` [Qemu-devel] [PULL 2/3] vnc: -readconfig fix Gerd Hoffmann
2015-03-10 11:16 ` [Qemu-devel] [PULL 3/3] Fix crash when connecting to VNC through websocket Gerd Hoffmann
2015-03-11  8:44 ` [Qemu-devel] [PULL 0/3] vnc patch queue Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2014-06-02 14:33 Gerd Hoffmann
2014-06-02 15:09 ` Peter Maydell

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