mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
virtio-serial: Send out guest data to ports only if port is opened
Data should be written only when ports are open. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
committed by
Anthony Liguori
parent
4048c7c321
commit
3ecb45f893
@@ -335,6 +335,11 @@ static void handle_output(VirtIODevice *vdev, VirtQueue *vq)
|
||||
goto next_buf;
|
||||
}
|
||||
|
||||
if (!port->host_connected) {
|
||||
ret = 0;
|
||||
goto next_buf;
|
||||
}
|
||||
|
||||
/*
|
||||
* A port may not have any handler registered for consuming the
|
||||
* data that the guest sends or it may not have a chardev associated
|
||||
|
||||
Reference in New Issue
Block a user