]> git.proxmox.com Git - mirror_qemu.git/commitdiff
char: update read handler in all cases
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 3 Oct 2016 09:47:03 +0000 (13:47 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 4 Oct 2016 08:00:26 +0000 (10:00 +0200)
In commit ac1b84dd1 (rhbz#1027181), a check was added to only update the
"read handler" when the front-end is opened, because the read callbacks
were not restored when a device is plugged. However, this seems not
correct, the handler is correctly set back on hotplug (in
virtconsole_realize) and the bug can no longer be reproduced.

Calling chr_update_read_handler() allows to fix the mux driver to stop
calling the child handlers (which may be going to be destroyed).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20161003094704.18087-2-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-char.c

index 7a85b1f0b3755b2f65e667723b4fe021b14188c5..4b330ea90fafdf4382ecfabb52e947b12e3fa8ba 100644 (file)
@@ -469,7 +469,7 @@ void qemu_chr_add_handlers_full(CharDriverState *s,
     s->chr_read = fd_read;
     s->chr_event = fd_event;
     s->handler_opaque = opaque;
-    if (fe_open && s->chr_update_read_handler) {
+    if (s->chr_update_read_handler) {
         s->chr_update_read_handler(s, context);
     }