Ui 20180202 patches
The following changes since commit 11ed801d3df3c6e46b2f1f97dcfbf4ca3a2a2f4f:
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2018-01-30 09:47:51 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/ui-20180202-pull-request
for you to fetch changes up to 627ebec208a8809818589e17f4fce55a59420ad2:
ui: correctly advance output buffer when writing SASL data (2018-02-02 07:48:18 +0100)
----------------------------------------------------------------
ui: use QIONetListener in vnc, bugfixes for sdl1 and vnc.
----------------------------------------------------------------
Daniel P. Berrange (1):
ui: convert VNC server to QIONetListener
Daniel P. Berrangé (2):
ui: fix mixup between qnum and qcode in SDL1 key handling
ui: correctly advance output buffer when writing SASL data
ui/vnc.h | 9 +-- ui/sdl.c | 9 ++- ui/vnc-auth-sasl.c | 2 +- ui/vnc.c | 195 +++++++++++++++-------------------------------------- 4 files changed, 67 insertions(+), 148 deletions(-)
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 1/3] ui: fix mixup between qnum and qcode in SDL1 key handling
From: Daniel P. Berrangé <[email protected]>
The previous commit:
commit 2ec78706d188df7d3dab43d07b19b05ef7800a44
Author: Daniel P. Berrange <[email protected]>
Date: Wed Jan 17 16:47:15 2018 +0000
ui: convert GTK and SDL1 frontends to keycodemapdb
changed the x_keymap.c keymap so that its target was qcodes instead of qnums. It updated the GTK frontend to take account of this change, but forgot to update the SDL1 frontend. Thus the SDL frontend was getting qcodes but dispatching them as if they were qnums. IOW, keyboard input was completely hosed with SDL1. Since the keyboard layout tables are still all based on qnums, it is easier to just keep SDL1 using qnums as it will be deleted in a few releases time.
Message-id: [email protected]
--- ui/sdl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
ui/sdl.c +8 -1
@@ -242,6 +242,7 @@ static const guint16 *sdl_get_keymap(size_t *maplen)static uint8_t sdl_keyevent_to_keycode (const SDL_KeyboardEvent *ev) { +int qcode;if (!keycode_map) {return 0 ; }
@@ -249,7 +250,13 @@ static uint8_t sdl_keyevent_to_keycode(const SDL_KeyboardEvent *ev)return 0 ; } -return keycode_map[ev->keysym.scancode]; + qcode = keycode_map[ev->keysym.scancode]; + +if (qcode > qemu_input_map_qcode_to_qnum_len) { +return 0 ; + } + +return qemu_input_map_qcode_to_qnum[qcode]; }static void reset_keys (void )
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 3/3] ui: correctly advance output buffer when writing SASL data
In reply to Gerd HoffmannFrom: Daniel P. Berrangé <[email protected]>
In this previous commit:
commit 8f61f1c5a6bc06438a1172efa80bc7606594fa07
Author: Daniel P. Berrange <[email protected]>
Date: Mon Dec 18 19:12:20 2017 +0000
ui: track how much decoded data we consumed when doing SASL encoding
I attempted to fix a flaw with tracking how much data had actually been processed when encoding with SASL. With that flaw, the VNC server could mistakenly discard queued data that had not been sent.
The fix was not quite right though, because it merely decremented the vs->output.offset value. This is effectively discarding data from the end of the pending output buffer. We actually need to discard data from the start of the pending output buffer. We also want to free memory that is no longer required. The correct way to handle this is to use the buffer_advance() helper method instead of directly manipulating the offset value.
Message-id: [email protected]
--- ui/vnc-auth-sasl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ui/vnc-auth-sasl.c +1 -1
@@ -84,7 +84,7 @@ size_t vnc_client_write_sasl(VncState *vs) }else { vs->force_update_offset -= vs->sasl.encodedRawLength; } - vs->output.offset -= vs->sasl.encodedRawLength; +buffer_advance (&vs->output, vs->sasl.encodedRawLength); vs->sasl.encoded =NULL ; vs->sasl.encodedOffset = vs->sasl.encodedLength =0 ; }
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 2/3] ui: convert VNC server to QIONetListener
In reply to Gerd HoffmannFrom: "Daniel P. Berrange" <[email protected]>
The VNC server already has the ability to listen on multiple sockets. Converting it to use the QIONetListener APIs though, will reduce the amount of code in the VNC server and improve the clarity of what is left.
Message-id: [email protected]
--- ui/vnc.h | 9 +-- ui/vnc.c | 195 ++++++++++++++++++--------------------------------------------- 2 files changed, 58 insertions(+), 146 deletions(-)
ui/vnc.h +3 -6
@@ -37,6 +37,7 @@#include "qemu/buffer.h" #include "io/channel-socket.h" #include "io/channel-tls.h" +#include "io/net-listener.h" #include <zlib.h> #include "keymaps.h"
@@ -146,12 +147,8 @@ struct VncDisplayint num_exclusive;int connections_limit;VncSharePolicy share_policy; -size_t nlsock; -QIOChannelSocket **lsock; -guint *lsock_tag; -size_t nlwebsock; -QIOChannelSocket **lwebsock; -guint *lwebsock_tag; +QIONetListener *listener; +QIONetListener *wslistener;DisplaySurface *ds;DisplayChangeListener dcl;kbd_layout_t *kbd_layout;
ui/vnc.c +55 -140
272 lines not on this page · raw message
Signature · 1 line
2.9.3
Quoted 15 lines · Gerd Hoffmann
The following changes since commit
11ed801d3df3c6e46b2f1f97dcfbf4ca3a2a2f4f:Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2018-01-30 09:47:51 +0000)
are available in the git repository at:
git://git.kraxel.org/qemutags/ui-20180202-pull-requestfor you to fetch changes up to
627ebec208a8809818589e17f4fce55a59420ad2:ui: correctly advance output buffer when writing SASL data (2018-02-02 07:48:18 +0100)
----------------------------------------------------------------
ui: use QIONetListener in vnc, bugfixes for sdl1 and vnc.
Quoted 6 lines
----------------------------------------------------------------
Daniel P. Berrange (1):
ui: convert VNC server to QIONetListenerDaniel P. Berrangé (2):
Odd effects based on choice of UTF-8 spellings. Dan, do you want to add a .mailmap entry to consolidate on a single preferred form of your name?
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 18 lines · Eric Blake
Quoted 17 lines · Gerd Hoffmann
The following changes since commit
11ed801d3df3c6e46b2f1f97dcfbf4ca3a2a2f4f:Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2018-01-30 09:47:51 +0000)
are available in the git repository at:
git://git.kraxel.org/qemutags/ui-20180202-pull-requestfor you to fetch changes up to
627ebec208a8809818589e17f4fce55a59420ad2:ui: correctly advance output buffer when writing SASL data (2018-02-02 07:48:18 +0100)
----------------------------------------------------------------
ui: use QIONetListener in vnc, bugfixes for sdl1 and vnc.----------------------------------------------------------------
Quoted 7 lines
Quoted 4 lines
Daniel P. Berrange (1):
ui: convert VNC server to QIONetListenerDaniel P. Berrangé (2):
Odd effects based on choice of UTF-8 spellings. Dan, do you want to add a .mailmap entry to consolidate on a single preferred form of your name?
Oh yes, I've just sent such a patch. I switched to the proper unicode spelling of my name in git since I figure enough of the software world handles unicode correctly by now :-)
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Peter Maydell
AppliedQuoted 24 lines · Gerd Hoffmann
The following changes since commit
11ed801d3df3c6e46b2f1f97dcfbf4ca3a2a2f4f:Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2018-01-30 09:47:51 +0000)
are available in the git repository at:
git://git.kraxel.org/qemutags/ui-20180202-pull-requestfor you to fetch changes up to
627ebec208a8809818589e17f4fce55a59420ad2:ui: correctly advance output buffer when writing SASL data (2018-02-02 07:48:18 +0100)
----------------------------------------------------------------
ui: use QIONetListener in vnc, bugfixes for sdl1 and vnc.----------------------------------------------------------------
Daniel P. Berrange (1):
ui: convert VNC server to QIONetListenerDaniel P. Berrangé (2):
ui: fix mixup between qnum and qcode in SDL1 key handling
ui: correctly advance output buffer when writing SASL data
Quoted 6 lines
ui/vnc.h | 9 +-- ui/sdl.c | 9 ++- ui/vnc-auth-sasl.c | 2 +- ui/vnc.c | 195 +++++++++++++++-------------------------------------- 4 files changed, 67 insertions(+), 148 deletions(-)
Applied, thanks.
-- PMM