From cdac620579b5bf44970b5f4bb11734fdfdf5bf59 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 10 May 2019 11:28:27 +0200 Subject: gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS Add the constant, so it can be used in create-subscriber-on-demand related patches. ITU-T Rec. E.164 6.1 states that maximum international number length should be 15. I did not find a source for a minimum length, but I've added the constant and set it to 1 for consistency (based on the existing osmo_msisdn_str_valid() function). Related: OS#2542 Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 --- src/gsm/gsm23003.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c index 2252f706..a97ed079 100644 --- a/src/gsm/gsm23003.c +++ b/src/gsm/gsm23003.c @@ -69,7 +69,7 @@ bool osmo_imsi_str_valid(const char *imsi) */ bool osmo_msisdn_str_valid(const char *msisdn) { - return is_n_digits(msisdn, 1, 15); + return is_n_digits(msisdn, GSM23003_MSISDN_MIN_DIGITS, GSM23003_MSISDN_MAX_DIGITS); } /*! Determine whether the given IMEI is valid according to 3GPP TS 23.003, -- cgit v1.2.3