From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCHv6 3/3] Mobile broadband provider info plugin
Date: Mon, 12 Sep 2011 03:37:11 -0500 [thread overview]
Message-ID: <4E6DC4B7.5000601@gmail.com> (raw)
In-Reply-To: <4E7898B5.2050705@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2649 bytes --]
Hi Oleg,
On 09/20/2011 08:44 AM, Oleg Zhurakivskyy wrote:
> Hello Denis,
>
> On 09/09/2011 07:58 AM, Denis Kenzior wrote:
>> After reviewing this patch I got the impression that you were still
>> making things just way too complicated and not taking full advantage of
>> the push/pop semantics. So just for fun I wrote my own version in
>> plugins/mbpi.[ch] and reworked tools/lookup-apn to use that. The code
>> seems to be valgrind clean and can handle duplicate detection, bail out
>> early, etc.
>>
>> Can you please take a look and suggest improvements? Once you think it
>> is good enough, I'd like you to rewrite this patch series to utilize
>> mbpi.c parser.
>
> Thanks, I have just looked. I am fine with this approach too.
>
> One of the ideas of the implementation in PATCHv6 is to have the naming
> of tag_start() / tag_end() handlers to correspond to the actual tag names.
>
> Can the same be achieved here? Can you please check PATCHv6 once again
> in order to check that idea?
>
Nope, I don't think so. The parser recursion only works when you parsed
the starting tag + any attributes, so you can't really use the subparser
idea in this way (e.g. network-id is particularly tricky).
The way I think about this is that the foo_start / foo_end handle all
elements that can be contained in <foo></foo>
> A few cosmetic issues:
>
> - the naming of struct gsm_data, perhaps, parser_data or provider_info
> would fit?
I did think about this, but I wanted to convey the fact that we're
provisioning gsm providers only (e.g. contained in gsm tag). However, I
really don't care here.
> - gsm_start() could be broken down into smaller functions?
Sure, this would partly accomplish your tag naming goal above.
> - Marcel wished the plugin naming "mobile-broadband-provider-info", even
> though it's a very long name. Shall we stick to that? I am fine with both.
>
Naming the plugin provision.c would be better. The full name is too long.
> Perhaps, some diagnostic output should be added too, in case anybody
> will need to troubleshoot it. For that, something like body_isprint()
> and ap_type_name() would be needed.
>
You shouldn't need body_isprint unless you're doing something terribly
wrong. The XML parser already ensures that the contents are valid UTF8.
> Are you fine with these?
Also, you might find that adding debugging might be tricky since this
code is intended to be used both from the plugin and the lookup-apn
tool. I was too lazy to hook this up, but if you feel strongly about
it, then go ahead and add this.
Regards,
-Denis
prev parent reply other threads:[~2011-09-12 8:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-14 13:16 [PATCHv6 0/3] Mobile broadband provider info plugin Oleg Zhurakivskyy
2011-09-14 13:16 ` [PATCHv6 1/3] Mobile broadband provider info plugin makefile changes Oleg Zhurakivskyy
2011-09-14 13:16 ` [PATCHv6 2/3] Mobile broadband provider info plugin autoconf support Oleg Zhurakivskyy
2011-09-14 13:16 ` [PATCHv6 3/3] Mobile broadband provider info plugin Oleg Zhurakivskyy
2011-09-09 4:58 ` Denis Kenzior
2011-09-20 13:44 ` Oleg Zhurakivskyy
2011-09-12 8:37 ` Denis Kenzior [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=4E6DC4B7.5000601@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