[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] char: emit the OPENED event only when a new cha
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PATCH 3/3] char: emit the OPENED event only when a new char connection is opened |
Date: |
Wed, 7 Oct 2009 16:40:40 +0530 |
The OPENED event gets sent also when qemu resets its state initially.
The consumers of the event aren't interested in receiving this event
on reset.
Signed-off-by: Amit Shah <address@hidden>
---
qemu-char.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index 8fde8cf..02c096c 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -120,7 +120,10 @@ static void qemu_chr_event(CharDriverState *s, int event)
static void qemu_chr_reset_bh(void *opaque)
{
CharDriverState *s = opaque;
- qemu_chr_event(s, CHR_EVENT_OPENED);
+
+ if (initial_reset_issued) {
+ qemu_chr_event(s, CHR_EVENT_OPENED);
+ }
qemu_bh_delete(s->bh);
s->bh = NULL;
}
--
1.6.2.5