vnc: cleanups and fixes
Hi,
Here is the vnc patch queue, with one bugfix and two cleanups.
please pull,
Gerd
The following changes since commit d279279e2b5cd40dbcc863fb66a695990f304077:
target-mips: implement UserLocal Register (2014-06-18 18:10:47 +0200)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-vnc-20140619-1
for you to fetch changes up to eb214ff8ef6cceec348f3ad1643b39443fe07910:
vnc: fix screen updates (2014-06-19 12:48:07 +0200)
----------------------------------------------------------------
vnc: cleanups and fixes
----------------------------------------------------------------
Gerd Hoffmann (1):
vnc: fix screen updates
Markus Armbruster (2):
vnc: Drop superfluous conditionals around g_free()
vnc: Drop superfluous conditionals around g_strdup()
ui/vnc-tls.c | 6 ++---- ui/vnc.c | 18 +++++++----------- 2 files changed, 9 insertions(+), 15 deletions(-)
[Qemu-devel] [PULL 1/3] vnc: Drop superfluous conditionals around g_free()
From: Markus Armbruster <[email protected]>
--- ui/vnc-tls.c | 6 ++---- ui/vnc.c | 12 ++++-------- 2 files changed, 6 insertions(+), 12 deletions(-)
ui/vnc-tls.c +2 -4
@@ -443,10 +443,8 @@ static int vnc_set_x509_credential(VncDisplay *vd, {struct stat sb; -if (*cred) { -g_free (*cred); - *cred =NULL ; - } +g_free (*cred); + *cred =NULL ; *cred =g_malloc (strlen (certdir) +strlen (filename) +2 );
ui/vnc.c +4 -8
@@ -2972,10 +2972,8 @@ static void vnc_display_close(DisplayState *ds)if (!vs)return ; -if (vs->display) { -g_free (vs->display); - vs->display =NULL ; - } +g_free (vs->display); + vs->display =NULL ;if (vs->lsock !=-1 ) {qemu_set_fd_handler2 (vs->lsock,NULL ,NULL ,NULL ,NULL );close (vs->lsock);
@@ -3010,10 +3008,8 @@ int vnc_display_password(DisplayState *ds, const char *password)return -EINVAL ; } -if (vs->password) { -g_free (vs->password); - vs->password =NULL ; - } +g_free (vs->password); + vs->password =NULL ;if (password) { vs->password =g_strdup (password); }
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 3/3] vnc: fix screen updates
In reply to Gerd HoffmannBug was added by 38ee14f4f33f8836fc0e209ca59c6ae8c6edf380. vnc_jobs_join call is missing in one code path.
--- ui/vnc.c | 3 +++ 1 file changed, 3 insertions(+)
ui/vnc.c +3 -0
@@ -935,6 +935,9 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) }vnc_job_push (job); +if (sync) { +vnc_jobs_join (vs); + } vs->force_update =0 ;return n; }
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PULL 3/3] vnc: fix screen updates
Quoted 25 lines
Bug was added by
38ee14f4f33f8836fc0e209ca59c6ae8c6edf380.vnc_jobs_joincall is missing in one code path.Reported-by Anthony PERARD <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>---
ui/vnc.c| 3 +++1 file changed, 3 insertions(+)ui/vnc.c +3
-0@@ -935,6 +935,9 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) }vnc_job_push (job); +if (sync) { +vnc_jobs_join (vs); + } vs->force_update =0 ;return n; }Signature · 1 line
1.8.3.1
What about below raw patch,
@@ -935,14 +935,13 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync)
}
vnc_job_push(job);
vs->force_update = 0;
- return n;
}
if (vs->csock == -1) {
vnc_disconnect_finish(vs);
} else if (sync) {
vnc_jobs_join(vs);
}- return 0;
+ return n;
Thanks,
Zhang Haoyu
[Qemu-devel] [PULL 2/3] vnc: Drop superfluous conditionals around g_strdup()
In reply to Gerd HoffmannFrom: Markus Armbruster <[email protected]>
--- ui/vnc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
ui/vnc.c +1 -4
@@ -3009,10 +3009,7 @@ int vnc_display_password(DisplayState *ds, const char *password) }g_free (vs->password); - vs->password =NULL ; -if (password) { - vs->password =g_strdup (password); - } + vs->password =g_strdup (password);return 0 ; }
Signature · 1 line
1.8.3.1
Peter Maydell
AppliedQuoted 13 lines · Gerd Hoffmann
Hi,
Here is the vnc patch queue, with one bugfix and two cleanups.
please pull,
GerdThe following changes since commit
d279279e2b5cd40dbcc863fb66a695990f304077:target-mips: implement UserLocal Register (2014-06-18 18:10:47 +0200)
are available in the git repository at:
Quoted 8 lines
git://git.kraxel.org/qemutags/pull-vnc-20140619-1for you to fetch changes up to
eb214ff8ef6cceec348f3ad1643b39443fe07910:vnc: fix screen updates (2014-06-19 12:48:07 +0200)
----------------------------------------------------------------
vnc: cleanups and fixes
Applied, thanks.
-- PMM