Hi Denis,
2011/7/7 Denis Kenzior <denkenz(a)gmail.com>:
Hi Frédéric,
On 07/07/2011 09:19 AM, Frédéric Dalleau wrote:
> This patch fix an issue with AT parser in gatserver.
>
> If an empty command is issued after AT, then 2 answers are sent. The parser can
> also get in a bad state where next commands will not be handled. After that the
> parser will get back on his feets. This is caused by reentrency:
> new_bytes() calls g_at_server_send_final(), which in turns calls server_resume
> which calls new_bytes() again synchronously.
>
We should not try to set the read handler if it already set. Have you
tried adding:
if (server->suspended == FALSE)
return;
I like the idea of this one, but it still exhibit an issue in the case of A/:
Server_parse_line suspends and resumes in the
same function.
Regards,
Frédéric