Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9665 )
Change subject: cosmetic / linking: move str_to_imsi() out of abis_rsl.c ...................................................................... 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 --- M include/osmocom/bsc/abis_rsl.h M include/osmocom/bsc/gsm_04_08_utils.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/gsm_04_08_utils.c M src/osmo-bsc/paging.c M src/osmo-bsc/pcu_sock.c 6 files changed, 14 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index fc21238..2fe8c38 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -68,7 +68,6 @@ 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 bdfca71..4349a37 100644 --- a/include/osmocom/bsc/gsm_04_08_utils.h +++ b/include/osmocom/bsc/gsm_04_08_utils.h @@ -39,3 +39,5 @@ 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 add4390..ab3658d 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -167,16 +167,6 @@ 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 5bfdf97..e9aeb55 100644 --- a/src/osmo-bsc/gsm_04_08_utils.c +++ b/src/osmo-bsc/gsm_04_08_utils.c @@ -703,3 +703,13 @@ 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; +} diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index 886d28b..feb9fea 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -50,6 +50,7 @@ #include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/chan_alloc.h> #include <osmocom/bsc/bsc_api.h> +#include <osmocom/bsc/gsm_04_08_utils.h> void *tall_paging_ctx = NULL; diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 5a3fefa..8a3c331 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -43,6 +43,7 @@ #include <osmocom/bsc/signal.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/abis_rsl.h> +#include <osmocom/bsc/gsm_04_08_utils.h> static int pcu_sock_send(struct gsm_bts *bts, struct msgb *msg); uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx); -- To view, visit https://gerrit.osmocom.org/9665 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6e90831d7e618ce3c8e7417082a82c97f6681668 Gerrit-Change-Number: 9665 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder