From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2 2/4] voicecall: refactor emergency number list handling
Date: Wed, 30 Mar 2011 10:41:45 -0500 [thread overview]
Message-ID: <4D934F39.5060708@gmail.com> (raw)
In-Reply-To: <B668883EB5DD7144ADFC248A72176EA802EEFF8F@fioues07.ebgroup.elektrobit.com>
[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]
Hi Jeevaka,
On 03/30/2011 08:33 AM, Jeevaka.Badrappan(a)elektrobit.com wrote:
> Hi Denis,
>
> Denis Kenzior wrote:
>> Hi Jeevaka,
>>
>>> void emit_en_list_changed(struct ofono_voicecall *vc) static void
>>> set_new_ecc(struct ofono_voicecall *vc) {
>>> int i = 0;
>>> + GSList *l;
>>>
>>> g_slist_foreach(vc->en_list, (GFunc) g_free, NULL);
>>> g_slist_free(vc->en_list); @@ -2079,6 +2081,12 @@ static void
>>> set_new_ecc(struct ofono_voicecall *vc) vc->en_list =
>>> vc->new_en_list; vc->new_en_list = NULL;
>>>
>>> + for (l = vc->sim_en_list; l; l = l->next) {
>>> + if (!g_slist_find_custom(vc->en_list, l->data,
> number_compare))
>>> + vc->en_list = g_slist_prepend(vc->en_list,
>>> +
>> g_strdup(l->data));
>>> + }
>>> +
>>> while (default_en_list[i]) {
>>> GSList *l;
>>>
>>> @@ -2120,10 +2128,11 @@ static void ecc_g2_read_cb(int ok, int
>>> total_length, int record, data += 3;
>>>
>>> if (en[0] != '\0')
>>> - vc->new_en_list =
>> g_slist_prepend(vc->new_en_list,
>>> + vc->sim_en_list =
>> g_slist_prepend(vc->sim_en_list,
>>>
>> g_strdup(en));
>>
>> To preserve the old behavior, can we also check that the
>> number is not on the default_en_list?
>
> SIM ecc number check with default_en_list is already taken care inside
> set_new_ecc function.
>
Thinking some more about it, yes you're absolutely right that it works
out in the end.
It might still be a good idea to use a Hashtable to fake a Set (e.g.
uniqueness) behavior of ECCs. That would make the driver
implementations a bit simpler as well.
Regards,
-Denis
next prev parent reply other threads:[~2011-03-30 15:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 13:58 [PATCH v2 0/4] Support for emergency number list from network/modem Jeevaka Badrappan
2011-03-28 13:58 ` [PATCH v2 1/4] include: Add ofono_voicecall_en_list_notify api Jeevaka Badrappan
2011-03-30 3:03 ` Denis Kenzior
2011-03-28 13:58 ` [PATCH v2 2/4] voicecall: refactor emergency number list handling Jeevaka Badrappan
2011-03-30 3:06 ` Denis Kenzior
2011-03-30 13:33 ` Jeevaka.Badrappan
2011-03-30 15:41 ` Denis Kenzior [this message]
2011-03-28 13:58 ` [PATCH v2 3/4] voicecall: network emergency number list support Jeevaka Badrappan
2011-03-28 13:58 ` [PATCH v2 4/4] ifxmodem: " Jeevaka Badrappan
2011-03-30 3:17 ` Denis Kenzior
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=4D934F39.5060708@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