]> git.proxmox.com Git - qemu.git/commitdiff
qemu-char: add_handlers: Don't re-send the be_open event on unregister
authorHans de Goede <hdegoede@redhat.com>
Tue, 26 Mar 2013 10:08:00 +0000 (11:08 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 27 Mar 2013 15:26:49 +0000 (10:26 -0500)
Resending the be_open event only is useful when a frontend is registering, not
when it is unregistering.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Message-id: 1364292483-16564-9-git-send-email-hdegoede@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char.c

index ca9381bc0c485083017b82d5a372f4eed725e696..dee623e59217cb6bab78e2f7d6964c249a79da08 100644 (file)
@@ -241,7 +241,7 @@ void qemu_chr_add_handlers(CharDriverState *s,
 
     /* We're connecting to an already opened device, so let's make sure we
        also get the open event */
-    if (s->be_open) {
+    if (fe_open && s->be_open) {
         qemu_chr_be_generic_open(s);
     }
 }