From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 03/18] gathdlc: add mechansim to detect '+++' escape sequence
Date: Thu, 31 Mar 2011 10:25:41 -0500 [thread overview]
Message-ID: <4D949CF5.8080400@gmail.com> (raw)
In-Reply-To: <4D943C19.3030501@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]
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)?
- Why are you doing this here instead of waiting for the guard timeout
to expire after +++ has been detected?
>
>>> +
>>> + /*
>>> + * Wait for another pause of GUARD_TIMEOUTS ms before returning
>>> to command mode.
>>> + */
>>> + hdlc->paused = FALSE;
>>> + hdlc->pause_timeout = g_timeout_add (GUARD_TIMEOUTS,
>>> hdlc_suspend, hdlc);
>>> }
>>>
Regards,
-Denis
next prev parent reply other threads:[~2011-03-31 15:25 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 [this message]
2011-03-31 15:40 ` Guillaume Zajac
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=4D949CF5.8080400@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.