summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/gsm_subscriber.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-06-07 15:32:16 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-14 22:20:40 +0000
commit0fcd2e2fec966ac4e17222e7f53f2d0e5a7bf0ba (patch)
tree49bb94bc7ad856f277a72fd62c650a16d21e76ea /openbsc/src/libmsc/gsm_subscriber.c
parente152ffe14d1dfe2ffb4892ada5eede6ccb429338 (diff)
Make random extension range configurable
Previously if subscriber was automatically created it got assigned random MSISDN number between 20000 and 49999. Make it configurable with new vty command "subscriber-create-on-demand random" and expand vty tests to check it. Change-Id: I040a1d227b0c7a1601dc7c33eccb0007941408a6 Related: OS#1658
Diffstat (limited to 'openbsc/src/libmsc/gsm_subscriber.c')
-rw-r--r--openbsc/src/libmsc/gsm_subscriber.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index 57c10cf7e..1dc2cc26d 100644
--- a/openbsc/src/libmsc/gsm_subscriber.c
+++ b/openbsc/src/libmsc/gsm_subscriber.c
@@ -203,9 +203,10 @@ void subscr_remove_request(struct subscr_request *request)
}
struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp,
- const char *imsi)
+ const char *imsi, uint64_t smin,
+ uint64_t smax)
{
- struct gsm_subscriber *subscr = db_create_subscriber(imsi);
+ struct gsm_subscriber *subscr = db_create_subscriber(imsi, smin, smax);
if (subscr)
subscr->group = sgrp;
return subscr;