Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] Fix issue with AT parser in gatserver
Date: Mon, 11 Jul 2011 16:25:48 -0500	[thread overview]
Message-ID: <4E1B6A5C.7060100@gmail.com> (raw)
In-Reply-To: <CA+QXtDuRd8zPZh7h584z7yQ7Nr3RB7VLwS9r-Ovz4bgw+mJBBg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]

Hi Frederic,

On 07/08/2011 09:44 AM, Dalleau, Frederic wrote:
> Hi Denis,
> 
> 2011/7/7 Denis Kenzior <denkenz@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.
> 

I think I fixed this one as well in commit 329f2d7.  Let me know if you
encounter further problems.

Regards,
-Denis

  reply	other threads:[~2011-07-11 21:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 14:19 [PATCH] Fix issue with AT parser in gatserver =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-07-07  6:02 ` Denis Kenzior
2011-07-08 14:44   ` Dalleau, Frederic
2011-07-11 21:25     ` Denis Kenzior [this message]
2011-07-07 14:19 ` [PATCH] gatchat: Fix reentrency issue with empty commands =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E1B6A5C.7060100@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox