From: Yang Gu <yang.gu@intel.com>
To: ofono@ofono.org
Subject: [PATCH 2/7] Make the function to parse mcc and mnc public
Date: Fri, 26 Mar 2010 00:07:31 +0800 [thread overview]
Message-ID: <1269533256-29095-2-git-send-email-yang.gu@intel.com> (raw)
In-Reply-To: <1269533256-29095-1-git-send-email-yang.gu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]
---
src/simutil.c | 6 +++---
src/simutil.h | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/simutil.c b/src/simutil.c
index d9383b7..9fb111f 100644
--- a/src/simutil.c
+++ b/src/simutil.c
@@ -538,7 +538,7 @@ static char *sim_network_name_parse(const unsigned char *buffer, int length,
return ret;
}
-static void parse_mcc_mnc(const guint8 *bcd, char *mcc, char *mnc)
+void sim_parse_mcc_mnc(const guint8 *bcd, char *mcc, char *mnc)
{
static const char digit_lut[] = "0123456789*#abd\0";
guint8 digit;
@@ -609,7 +609,7 @@ struct sim_spdi *sim_spdi_new(const guint8 *tlv, int length)
oper = g_new0(struct spdi_operator, 1);
- parse_mcc_mnc(plmn_list, oper->mcc, oper->mnc);
+ sim_parse_mcc_mnc(plmn_list, oper->mcc, oper->mnc);
spdi->operators = g_slist_insert_sorted(spdi->operators, oper,
spdi_operator_compare);
}
@@ -694,7 +694,7 @@ static struct opl_operator *opl_operator_alloc(const guint8 *record)
{
struct opl_operator *oper = g_new0(struct opl_operator, 1);
- parse_mcc_mnc(record, oper->mcc, oper->mnc);
+ sim_parse_mcc_mnc(record, oper->mcc, oper->mnc);
record += 3;
oper->lac_tac_low = (record[0] << 8) | record[1];
diff --git a/src/simutil.h b/src/simutil.h
index 043c21f..7590cca 100644
--- a/src/simutil.h
+++ b/src/simutil.h
@@ -181,6 +181,7 @@ const struct sim_eons_operator_info *sim_eons_lookup(struct sim_eons *eons,
const char *mnc);
void sim_eons_free(struct sim_eons *eons);
+void sim_parse_mcc_mnc(const guint8 *bcd, char *mcc, char *mnc);
struct sim_spdi *sim_spdi_new(const guint8 *tlv, int length);
gboolean sim_spdi_lookup(struct sim_spdi *spdi,
const char *mcc, const char *mnc);
--
1.6.3.3
next prev parent reply other threads:[~2010-03-25 16:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 16:07 [PATCH 1/7] Unify some macro names of ber-tlv and comprehension tlv Yang Gu
2010-03-25 16:07 ` Yang Gu [this message]
2010-03-25 16:07 ` [PATCH 3/7] Add parser for location information objects Yang Gu
2010-03-25 16:07 ` [PATCH 4/7] Add parser for imei objects Yang Gu
2010-03-25 16:07 ` [PATCH 5/7] Add parser for common bool object Yang Gu
2010-03-25 16:07 ` [PATCH 6/7] Use common bool parser to reimplement immediate response object Yang Gu
2010-03-25 16:07 ` [PATCH 7/7] Add parser for help request objects Yang Gu
2010-03-25 16:43 ` Denis Kenzior
2010-03-25 16:43 ` [PATCH 6/7] Use common bool parser to reimplement immediate response object Denis Kenzior
2010-03-25 16:43 ` [PATCH 5/7] Add parser for common bool object Denis Kenzior
2010-03-25 16:42 ` [PATCH 4/7] Add parser for imei objects Denis Kenzior
2010-03-25 16:42 ` [PATCH 3/7] Add parser for location information objects Denis Kenzior
2010-03-25 16:41 ` [PATCH 2/7] Make the function to parse mcc and mnc public Denis Kenzior
2010-03-25 16:41 ` [PATCH 1/7] Unify some macro names of ber-tlv and comprehension tlv 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=1269533256-29095-2-git-send-email-yang.gu@intel.com \
--to=yang.gu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox