aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-11-22 18:30:02 +0100
committerBlue Swirl <blauwirbel@gmail.com>2012-11-24 20:03:25 +0000
commit06dec08374a4a4bd882994a3dfd103e314584c4c (patch)
tree598db358aa036250cd99081fa10c88641b6661e2 /qemu-char.c
parenta85903ff80f9bfa6390069856a8ec706b0b5ad5a (diff)
chardev: Use real-time clock for open timer
The vm clock may be stopped, and then we won't get open events anymore. Seen with QMP sessions. Reported-by: Dietmar Maurer <dietmar@proxmox.com> Tested-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 88f40254b7..242b799909 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -134,9 +134,9 @@ static void qemu_chr_fire_open_event(void *opaque)
void qemu_chr_generic_open(CharDriverState *s)
{
if (s->open_timer == NULL) {
- s->open_timer = qemu_new_timer_ms(vm_clock,
+ s->open_timer = qemu_new_timer_ms(rt_clock,
qemu_chr_fire_open_event, s);
- qemu_mod_timer(s->open_timer, qemu_get_clock_ms(vm_clock) - 1);
+ qemu_mod_timer(s->open_timer, qemu_get_clock_ms(rt_clock) - 1);
}
}