On 11/07/2017 11:33, [email protected] 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

Reply via email to