From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH] ui: fix dcl unregister
Date: Thu, 9 Nov 2017 08:37:59 +0100 [thread overview]
Message-ID: <20171109073759.5910-1-kraxel@redhat.com> (raw)
register checks for dcl->ds being NULL, to avoid registering
the same dcl twice.
Therefore dcl->ds must be cleared on unregister, otherwise
un-registering and re-registering doesn't work.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1510809
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/console.c | 1 +
ui/vnc.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/ui/console.c b/ui/console.c
index eca854cbd5..c4c95abed7 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1471,6 +1471,7 @@ void unregister_displaychangelistener(DisplayChangeListener *dcl)
dcl->con->dcls--;
}
QLIST_REMOVE(dcl, next);
+ dcl->ds = NULL;
gui_setup_refresh(ds);
}
diff --git a/ui/vnc.c b/ui/vnc.c
index 9f8d5a1b1f..bd46f11fcc 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3044,6 +3044,7 @@ void vnc_display_init(const char *id)
{
VncDisplay *vd;
+ fprintf(stderr, "%s: %s\n", __func__, id);
if (vnc_display_find(id) != NULL) {
return;
}
@@ -3982,6 +3983,7 @@ void vnc_display_open(const char *id, Error **errp)
}
if (con != vd->dcl.con) {
+ fprintf(stderr, "%s: %s\n", __func__, id);
unregister_displaychangelistener(&vd->dcl);
vd->dcl.con = con;
register_displaychangelistener(&vd->dcl);
--
2.9.3
next reply other threads:[~2017-11-09 7:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 7:37 Gerd Hoffmann [this message]
2017-11-09 10:39 ` [Qemu-devel] [PATCH] ui: fix dcl unregister Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171109073759.5910-1-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).