From: Denis Kenzior <denkenz@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Marcin Kraglak <marcin.kraglak@tieto.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCHv2 3/8] shared/hfp: Add initial implementiation of processing commands
Date: Fri, 28 Feb 2014 09:46:56 -0600 [thread overview]
Message-ID: <5310AF70.1000601@gmail.com> (raw)
In-Reply-To: <BA9EB144-665E-4A51-81EF-EEEFAB18C822@holtmann.org>
Hi Marcel,
>> + if (data[result.offset] == '+')
>> + return process_extended(hfp, &result);
>> + else
>> + return process_basic(hfp, &result);
>
> Please do not do this. I mentioned this before, this basic vs extended is pointless.
>
> Command matching should be either based on commands like “D” or “+BRSF” and not bother trying to treat the + any special. See how src/emulator.c in oFono registers all the handlers.
>
There is a difference in syntax between basic commands and extended
commands. HFP only uses two basic commands, namely ATD and ATA so they
might be simply handled as a special case. Others are implicit, e.g.
ATE, ATV, etc.
Regards,
-Denis
next prev parent reply other threads:[~2014-02-28 15:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 9:39 [PATCHv2 0/8] HFP_GW parser Marcin Kraglak
2014-02-27 9:39 ` [PATCHv2 1/8] shared/hfp: Fix parsing line with few commands Marcin Kraglak
2014-02-28 7:00 ` Marcel Holtmann
2014-02-28 7:08 ` Marcin Kraglak
2014-02-27 9:40 ` [PATCHv2 2/8] shared/hfp: Add prefix handlers functionality Marcin Kraglak
2014-02-28 7:06 ` Marcel Holtmann
2014-02-28 7:48 ` Marcin Kraglak
2014-02-27 9:40 ` [PATCHv2 3/8] shared/hfp: Add initial implementiation of processing commands Marcin Kraglak
2014-02-28 7:05 ` Marcel Holtmann
2014-02-28 7:37 ` Marcin Kraglak
2014-02-28 15:46 ` Denis Kenzior [this message]
2014-02-27 9:40 ` [PATCHv2 4/8] shared/hfp: Add implementation of precessing commands Marcin Kraglak
2014-02-28 7:13 ` Marcel Holtmann
2014-02-28 7:46 ` Marcin Kraglak
2014-02-27 9:40 ` [PATCHv2 5/8] shared/hfp: Add get_number implementation Marcin Kraglak
2014-02-27 9:40 ` [PATCHv2 6/8] shared/hfp: Add open/close container function Marcin Kraglak
2014-02-27 9:40 ` [PATCHv2 7/8] shared/hfp: Add function to get string Marcin Kraglak
2014-02-27 9:40 ` [PATCHv2 8/8] shared/hfp: Add function to get unquoted string Marcin Kraglak
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=5310AF70.1000601@gmail.com \
--to=denkenz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=marcin.kraglak@tieto.com \
/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;
as well as URLs for NNTP newsgroup(s).