* [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes
@ 2014-06-19 11:03 Gerd Hoffmann
2014-06-19 11:03 ` [Qemu-devel] [PULL 1/3] vnc: Drop superfluous conditionals around g_free() Gerd Hoffmann
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2014-06-19 11:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
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(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 1/3] vnc: Drop superfluous conditionals around g_free()
2014-06-19 11:03 [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes Gerd Hoffmann
@ 2014-06-19 11:03 ` Gerd Hoffmann
2014-06-19 11:03 ` [Qemu-devel] [PULL 2/3] vnc: Drop superfluous conditionals around g_strdup() Gerd Hoffmann
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2014-06-19 11:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Markus Armbruster, Anthony Liguori, Gerd Hoffmann
From: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/vnc-tls.c | 6 ++----
ui/vnc.c | 12 ++++--------
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c
index 50275de..6392326 100644
--- a/ui/vnc-tls.c
+++ b/ui/vnc-tls.c
@@ -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);
diff --git a/ui/vnc.c b/ui/vnc.c
index 1684206..d771a2c 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -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);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 2/3] vnc: Drop superfluous conditionals around g_strdup()
2014-06-19 11:03 [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes Gerd Hoffmann
2014-06-19 11:03 ` [Qemu-devel] [PULL 1/3] vnc: Drop superfluous conditionals around g_free() Gerd Hoffmann
@ 2014-06-19 11:03 ` Gerd Hoffmann
2014-06-19 11:03 ` [Qemu-devel] [PULL 3/3] vnc: fix screen updates Gerd Hoffmann
2014-06-20 16:40 ` [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes Peter Maydell
3 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2014-06-19 11:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Markus Armbruster, Anthony Liguori, Gerd Hoffmann
From: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/vnc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index d771a2c..6c9d4f3 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 3/3] vnc: fix screen updates
2014-06-19 11:03 [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes Gerd Hoffmann
2014-06-19 11:03 ` [Qemu-devel] [PULL 1/3] vnc: Drop superfluous conditionals around g_free() Gerd Hoffmann
2014-06-19 11:03 ` [Qemu-devel] [PULL 2/3] vnc: Drop superfluous conditionals around g_strdup() Gerd Hoffmann
@ 2014-06-19 11:03 ` Gerd Hoffmann
2014-08-27 4:39 ` Zhang Haoyu
2014-06-20 16:40 ` [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes Peter Maydell
3 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2014-06-19 11:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, Anthony Liguori
Bug was added by 38ee14f4f33f8836fc0e209ca59c6ae8c6edf380.
vnc_jobs_join call is missing in one code path.
Reported-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/vnc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/vnc.c b/ui/vnc.c
index 6c9d4f3..aac93f0 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes
2014-06-19 11:03 [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes Gerd Hoffmann
` (2 preceding siblings ...)
2014-06-19 11:03 ` [Qemu-devel] [PULL 3/3] vnc: fix screen updates Gerd Hoffmann
@ 2014-06-20 16:40 ` Peter Maydell
3 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2014-06-20 16:40 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 19 June 2014 12:03, Gerd Hoffmann <kraxel@redhat.com> wrote:
> 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
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 3/3] vnc: fix screen updates
2014-06-19 11:03 ` [Qemu-devel] [PULL 3/3] vnc: fix screen updates Gerd Hoffmann
@ 2014-08-27 4:39 ` Zhang Haoyu
0 siblings, 0 replies; 6+ messages in thread
From: Zhang Haoyu @ 2014-08-27 4:39 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel; +Cc: Anthony Liguori
>Bug was added by 38ee14f4f33f8836fc0e209ca59c6ae8c6edf380.
>vnc_jobs_join call is missing in one code path.
>
>Reported-by: Anthony PERARD <anthony.perard@citrix.com>
>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>---
> ui/vnc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/ui/vnc.c b/ui/vnc.c
>index 6c9d4f3..aac93f0 100644
>--- a/ui/vnc.c
>+++ b/ui/vnc.c
>@@ -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;
> }
>--
>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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-08-27 4:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-19 11:03 [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes Gerd Hoffmann
2014-06-19 11:03 ` [Qemu-devel] [PULL 1/3] vnc: Drop superfluous conditionals around g_free() Gerd Hoffmann
2014-06-19 11:03 ` [Qemu-devel] [PULL 2/3] vnc: Drop superfluous conditionals around g_strdup() Gerd Hoffmann
2014-06-19 11:03 ` [Qemu-devel] [PULL 3/3] vnc: fix screen updates Gerd Hoffmann
2014-08-27 4:39 ` Zhang Haoyu
2014-06-20 16:40 ` [Qemu-devel] [PULL 0/3] vnc: cleanups and fixes 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).