aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-06-08 18:46:04 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-06-16 15:53:51 +0200
commitd0fbecd4b5d91a059f78ba2e9f43f833943858e7 (patch)
tree35de7be15578d6f92cd0989dded969c38e36c130
parentf0ff9a67117dc22d838769fe6eef67778abd43b9 (diff)
str_to_imsi
-rw-r--r--include/osmocom/bsc/abis_rsl.h1
-rw-r--r--include/osmocom/bsc/gsm_04_08_utils.h2
-rw-r--r--src/osmo-bsc/abis_rsl.c10
-rw-r--r--src/osmo-bsc/gsm_04_08_utils.c10
4 files changed, 12 insertions, 11 deletions
diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h
index fc212380b..2fe8c38e7 100644
--- a/include/osmocom/bsc/abis_rsl.h
+++ b/include/osmocom/bsc/abis_rsl.h
@@ -68,7 +68,6 @@ int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act);
int abis_rsl_rcvmsg(struct msgb *msg);
-uint64_t str_to_imsi(const char *imsi_str);
int rsl_release_request(struct gsm_lchan *lchan, uint8_t link_id,
enum rsl_rel_mode release_mode);
diff --git a/include/osmocom/bsc/gsm_04_08_utils.h b/include/osmocom/bsc/gsm_04_08_utils.h
index bdfca71a2..4349a37cc 100644
--- a/include/osmocom/bsc/gsm_04_08_utils.h
+++ b/include/osmocom/bsc/gsm_04_08_utils.h
@@ -39,3 +39,5 @@ static inline struct msgb *gsm48_msgb_alloc_name(const char *name)
return msgb_alloc_headroom(GSM48_ALLOC_SIZE, GSM48_ALLOC_HEADROOM,
name);
}
+
+uint64_t str_to_imsi(const char *imsi_str);
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index add439069..ab3658d53 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -167,16 +167,6 @@ static struct gsm_lchan *lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
return lchan;
}
-/* 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;
-}
-
static struct msgb *rsl_msgb_alloc(void)
{
return msgb_alloc_headroom(RSL_ALLOC_SIZE, RSL_ALLOC_HEADROOM,
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;
+}