diff options
author | Max <msuraev@sysmocom.de> | 2016-06-07 15:32:16 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-06-14 22:20:40 +0000 |
commit | 0fcd2e2fec966ac4e17222e7f53f2d0e5a7bf0ba (patch) | |
tree | 49bb94bc7ad856f277a72fd62c650a16d21e76ea /openbsc/tests/db | |
parent | e152ffe14d1dfe2ffb4892ada5eede6ccb429338 (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/tests/db')
-rw-r--r-- | openbsc/tests/db/db_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index ee0cbca5b..dc814813d 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -164,7 +164,7 @@ static void test_subs(const char *alice_imsi, char *imei1, char *imei2) struct gsm_subscriber *alice = NULL, *alice_db; char scratch_str[256]; - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN); db_subscriber_assoc_imei(alice, imei1); if (imei2) db_subscriber_assoc_imei(alice, imei2); @@ -217,7 +217,7 @@ int main() struct gsm_subscriber *alice_db; char *alice_imsi = "3243245432345"; - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN); db_sync_subscriber(alice); alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice->imsi); COMPARE(alice, alice_db); @@ -228,7 +228,7 @@ int main() test_subs("9993245423445", "1234567890", "6543560920"); /* create it again and see it fails */ - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN); OSMO_ASSERT(!alice); test_sms(); |