diff options
author | Corentin Chary <corentincj@iksaif.net> | 2010-07-07 20:58:03 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-07-26 17:36:14 -0500 |
commit | d01f9595400788ca8a117522f5dfbc43c59b4cc7 (patch) | |
tree | 94abec7af4328bfe5d2d8aa5b16e7981e6c62761 /ui | |
parent | bd023f953e5e51237726af04300e4637fe203774 (diff) | |
download | hqemu-d01f9595400788ca8a117522f5dfbc43c59b4cc7.zip hqemu-d01f9595400788ca8a117522f5dfbc43c59b4cc7.tar.gz |
vnc: add missing lock for vnc_cursor_define()
All vnc_write() calls must be locked (except the ones present before
the protocol initialization).
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/vnc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -796,6 +796,7 @@ static int vnc_cursor_define(VncState *vs) int isize; if (vnc_has_feature(vs, VNC_FEATURE_RICH_CURSOR)) { + vnc_lock_output(vs); vnc_write_u8(vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE); vnc_write_u8(vs, 0); /* padding */ vnc_write_u16(vs, 1); /* # of rects */ @@ -804,6 +805,7 @@ static int vnc_cursor_define(VncState *vs) isize = c->width * c->height * vs->clientds.pf.bytes_per_pixel; vnc_write_pixels_generic(vs, &pf, c->data, isize); vnc_write(vs, vs->vd->cursor_mask, vs->vd->cursor_msize); + vnc_unlock_output(vs); return 0; } return -1; |