From: Guillaume Zajac <guillaume.zajac@linux.intel.com>
To: ofono@ofono.org
Subject: Re: [PATCH 03/18] gathdlc: add mechansim to detect '+++' escape sequence
Date: Thu, 31 Mar 2011 17:40:38 +0200 [thread overview]
Message-ID: <4D94A076.5050902@linux.intel.com> (raw)
In-Reply-To: <4D949CF5.8080400@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]
Hi Denis,
On 31/03/2011 17:25, Denis Kenzior wrote:
> Hi Guillaume,
>
>>>> +suspend:
>>>> + /*
>>>> + * If the suspend timeout still exists,
>>>> + * delete it.
>>>> + */
>>>> + if (hdlc->suspend_timeout> 0)
>>>> + g_source_remove(hdlc->suspend_timeout);
>>>> +
>>>> + /*
>>>> + * Restart the counter and reset the ring buffer.
>>>> + */
>>>> + hdlc->cmpt = 0;
>>>> + ring_buffer_reset(rbuf);
>>> This sounds like a really bad idea. What are you trying to accomplish
>>> here?
>> If I don't reset ring_buffer, I am receiving "+++" on GAtServer when I
>> return to command mode and it is blocking following AT commands.
>> I can't send next ATH0 or ATO0. Do you have any idea how to prevent
>> receiving GAtServer to receive it?
> So two issues:
>
> - why are you using ring_buffer_reset instead of ring_buffer_drain(buf, 3)?
I didn't think about it :)
> - Why are you doing this here instead of waiting for the guard timeout
> to expire after +++ has been detected?
>
I didn't think that an HDLC frame can contain +++++...
I will change this.
Thanks.
Kind regards,
Guillaume
prev parent reply other threads:[~2011-03-31 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 15:25 [PATCH 03/18] gathdlc: add mechansim to detect '+++' escape sequence Guillaume Zajac
2011-03-30 20:52 ` Denis Kenzior
2011-03-31 8:32 ` Guillaume Zajac
2011-03-31 15:25 ` Denis Kenzior
2011-03-31 15:40 ` Guillaume Zajac [this message]
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=4D94A076.5050902@linux.intel.com \
--to=guillaume.zajac@linux.intel.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