[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] 答复: Re: [PATCH V2] chardev: fix parallel device can't
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] 答复: Re: [PATCH V2] chardev: fix parallel device can't be reconnect |
Date: |
Tue, 11 Jul 2017 11:49:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 11/07/2017 11:33, address@hidden wrote:
>>> + if (qemu_chr_null_be_can_read(chr)) {
>>> + size = tcp_chr_recv(chr, (void *)buf, CHR_READ_BUF_LEN)
>>
>> It would be better not to destroy data in the channel, because the
>> device could set handlers later.
>
> This device do not register a chr_read function,so it's safe to
> destroy data(no read handler).
I agree, but this code doesn't know that the device is not changing
handlers later.
Paolo