Stratos Psomadakis e5554e2015 monitor: Reset HMP mon->rs in CHR_EVENT_OPEN
Commit cdaa86a54 ("Add G_IO_HUP handler for socket chardev") exposed a bug in
the way the HMP monitor handles its command buffer. When a client closes the
connection to the monitor, tcp_chr_read() will detect the G_IO_HUP condition
and call tcp_chr_disconnect() to close the server-side connection too. Due to
the fact that monitor reads 1 byte at a time (for each tcp_chr_read()), the
monitor readline state / buffers might contain junk (i.e. a half-finished
command). Thus, without calling readline_restart() on mon->rs in
CHR_EVENT_OPEN, future HMP commands will fail.

Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-09-26 13:14:10 -04:00
2014-09-18 20:02:01 +01:00
2014-09-04 17:39:07 +01:00
2014-09-25 13:34:03 +01:00
2014-09-25 18:54:21 +01:00
2014-09-25 13:34:03 +01:00
2014-09-22 11:39:45 +01:00
2014-08-29 10:46:58 +01:00
2014-08-29 10:46:58 +01:00
2014-09-16 11:04:09 +02:00
2014-09-26 09:34:39 +01:00
2014-08-29 10:48:45 +01:00
2014-09-22 11:39:45 +01:00
2014-09-22 11:39:45 +01:00
2014-09-02 16:07:31 +01:00
2014-09-19 17:20:11 +01:00
2014-09-23 12:08:55 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
No description provided
Readme 404 MiB
Languages
C 82.6%
C++ 6.5%
Python 3.4%
Dylan 2.9%
Shell 1.6%
Other 2.8%