]> git.proxmox.com Git - qemu.git/commit
qemu-char: correct return value from chr_read functions
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Apr 2013 15:32:08 +0000 (17:32 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 22 Apr 2013 13:52:20 +0000 (08:52 -0500)
commitcdbf6e165988ab9d7c01da03b9e27bb8ac0c76aa
tree45b752e501d7faf9d3fccd56cfecd8bc9659d216
parent85a67692d04e15a6b7d5a0e2b9d573d8bffbe108
qemu-char: correct return value from chr_read functions

Even if a CharDriverState's source is blocked by the front-end,
it must not be dropped. The IOWatchPoll that wraps it will take
care of adding and removing it to the main loop.  Only remove
the source when the channel is closed; and in that case, make sure
that the wrapping IOWatchPoll is removed too.

These should just be theoretical bugs.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1366385529-10329-4-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char.c