aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-08-17 19:37:52 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-08-28 21:11:06 +0200
commit8af6bb14a3a8bb40b0b3bf0171c018cd39026cb8 (patch)
treef9266908d350a1d17d22a3a8fb40cbf91122aced /monitor.c
parent3d7a1c44e2b23079485c0cd21ca2db04f886ec13 (diff)
monitor: accept input on resume
A chardev may stop trying to write if the associated can_read() callback returned 0. This happens when the monitor is suspended. The frontend is supposed to call qemu_chr_fe_accept_input() when it is ready to accept data again. An issue was observed with a spice port: pending commands may be delayed, as the chardev is not flushed. Most chardev don't use the accept_input() callback, and instead check regularly if they can write. The ones that do use it are braille, mux, msmouse, spice (abstract), spicevmc, spiceport, wctablet. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180817173752.19136-1-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index c049776603..c1add2ce09 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4411,6 +4411,7 @@ void monitor_resume(Monitor *mon)
assert(mon->rs);
readline_show_prompt(mon->rs);
}
+ qemu_chr_fe_accept_input(&mon->chr);
}
trace_monitor_suspend(mon, -1);
}