[PATCH] port-serial: remove response buffer when an error is returned

Aleksander Morgado aleksander at aleksander.es
Mon Jan 18 13:27:18 PST 2016


On Mon, Jan 18, 2016 at 9:53 PM, Dan Williams <dcbw at redhat.com> wrote:
>> > So wouldn't that also blow away the next messages in the buffer for
>> > something like cancellation or random internal MM errors?
>> >
>>
>> If we've got unsolicited messages interleaved with the response,
>> those
>> should have been processed in the subclassed parse_response(), at the
>> same time as we build the possible GError; so I don't think that
>> should
>> affect anything.
>
> I thought of a bunch of scenarios, and then figured out they weren't
> relevant for this patch.  But it took a while to get there and I wish
> it was clearer.
>
> So the logic (and patch) look OK to me.

I'm preparing another patch which changes how all this works and
hopefully makes it a bit simpler, will send it for review once tested.


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list