aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/gsm_04_08_utils.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-06-08 18:46:04 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-06-18 07:53:03 +0200
commitd0d204aaa25cb968405b8227007adf91b9939311 (patch)
treec0bcd6ffd0f760388c49004ecc85907782bcee59 /src/osmo-bsc/gsm_04_08_utils.c
parentf0ff9a67117dc22d838769fe6eef67778abd43b9 (diff)
cosmetic / linking: move str_to_imsi() out of abis_rsl.c
Move to gsm_04_08_utils.c so that it's possible to use it without linking/stubbing all of RSL. Change-Id: I6e90831d7e618ce3c8e7417082a82c97f6681668
Diffstat (limited to 'src/osmo-bsc/gsm_04_08_utils.c')
-rw-r--r--src/osmo-bsc/gsm_04_08_utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/osmo-bsc/gsm_04_08_utils.c b/src/osmo-bsc/gsm_04_08_utils.c
index 5bfdf97ff..e9aeb550f 100644
--- a/src/osmo-bsc/gsm_04_08_utils.c
+++ b/src/osmo-bsc/gsm_04_08_utils.c
@@ -703,3 +703,13 @@ int gsm48_paging_extract_mi(struct gsm48_pag_resp *resp, int length,
return gsm48_extract_mi(classmark2_lv, length - classmark_offset,
mi_string, mi_type);
}
+
+/* As per TS 03.03 Section 2.2, the IMSI has 'not more than 15 digits' */
+uint64_t str_to_imsi(const char *imsi_str)
+{
+ uint64_t ret;
+
+ ret = strtoull(imsi_str, NULL, 10);
+
+ return ret;
+}