From: jeevaka.badrappan@linux.intel.com
To: ofono@ofono.org
Subject: Re: [PATCH] ifxmodem: emergency number list support
Date: Thu, 09 Jun 2011 06:44:45 -0700 [thread overview]
Message-ID: <63214.10.254.193.112.1307627085.squirrel@linux.intel.com> (raw)
In-Reply-To: <4DED5CEF.8020205@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2188 bytes --]
Hi Denis,
>> +
>> + if (!g_at_result_iter_next_number(&iter, &total_cnt))
>> + return;
>> +
>> + if (!g_at_result_iter_next_string(&iter, &number))
>> + return;
>> +
>> + /* Skip the category, valid in simpresent and mcc fields */
>
> What is this comment referring to?
Following fields like category, valid in sim present state and mcc are
skipped as we are not going to use it. Just for information purpose.
I'll remove the comment.
>
>> +
>> + if (vd->en_list == NULL)
>> + vd->en_list = g_new0(char *, total_cnt + 1);
>> +
>> + vd->en_list[count] = g_strdup(number);
>> +
>> + if (index != total_cnt)
>> + return;
>> +
>> + ofono_voicecall_en_list_notify(vc, vd->en_list);
>> +
>> + g_strfreev(vd->en_list);
>> + vd->en_list = NULL;
>> +}
>> +
>> +static void xlema_read(gboolean ok, GAtResult *result, gpointer
>> user_data)
>> +{
>> + struct ofono_voicecall *vc = user_data;
>> + struct voicecall_data *vd = ofono_voicecall_get_data(vc);
>> + GAtResultIter iter;
>> + int num = 0;
>> + int index, total_cnt;
>> + const char *number;
>> +
>> + if (!ok) {
>> + DBG("Emergency number list read failed");
>> + return;
>> + }
>> +
>> + g_at_result_iter_init(&iter, result);
>> +
>> + while (g_at_result_iter_next(&iter, "+XLEMA:"))
>> + num += 1;
>> +
>> + vd->en_list = g_new0(char *, num + 1);
>> +
>> + num = 0;
>> + g_at_result_iter_init(&iter, result);
>> +
>> + while (g_at_result_iter_next(&iter, "+XLEMA:")) {
>> + if (!g_at_result_iter_next_number(&iter, &index))
>> + continue;
>> +
>> + if (!g_at_result_iter_next_number(&iter, &total_cnt))
>> + continue;
>> +
>> + if (!g_at_result_iter_next_string(&iter, &number))
>> + continue;
>> +
>> + /* Skip the category, valid in simpresent and mcc fields */
>> + g_at_result_iter_skip_next(&iter);
>> + g_at_result_iter_skip_next(&iter);
>> + g_at_result_iter_skip_next(&iter);
>
> What are you trying to achieve here? Since you're not checking the
> result, it doesn't look like this code serves any purpose.
Agreed no pointing in having this as we are not going to make use of the
fields. Will be removed.
Regards,
Jeevaka
next prev parent reply other threads:[~2011-06-09 13:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 15:44 [PATCH] ifxmodem: emergency number list support Jeevaka Badrappan
2011-06-06 23:04 ` Denis Kenzior
2011-06-09 13:44 ` jeevaka.badrappan [this message]
2011-07-20 13:23 ` Paccou, Nicolas
[not found] <8250E4885F9967469CAC3FB5CBA2CE69946ABFF9C4@irsmsx501.ger.corp.intel.c om>
2011-07-20 13:43 ` jeevaka.badrappan
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=63214.10.254.193.112.1307627085.squirrel@linux.intel.com \
--to=jeevaka.badrappan@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 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.