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/src/libmsc/ctrl_commands.c | |
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/src/libmsc/ctrl_commands.c')
-rw-r--r-- | openbsc/src/libmsc/ctrl_commands.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 0d6a37c96..a02db36b9 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + #include <osmocom/ctrl/control_cmd.h> #include <openbsc/gsm_data.h> #include <openbsc/gsm_subscriber.h> @@ -95,7 +96,9 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) subscr = subscr_get_by_imsi(net->subscr_group, imsi); if (!subscr) - subscr = subscr_create_subscriber(net->subscr_group, imsi); + subscr = subscr_create_subscriber(net->subscr_group, imsi, + net->ext_min, + net->ext_max); if (!subscr) goto fail; |