aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/ctrl_commands.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-06-30 10:25:49 +0200
committerHarald Welte <laforge@gnumonks.org>2016-07-09 19:52:54 +0000
commite6052c4cc756f7d3a5023a0ba57fe8d80783967c (patch)
tree477d30b6379ca349ce10b588f10c20e23baf717f /openbsc/src/libmsc/ctrl_commands.c
parent9f8f9b80214fabfb3ac7674341c18a61a6ffcc5f (diff)
Make random MSISDN assignment optional
Previously if subscriber was automatically created it got assigned random MSISDN number. Make it optional (defaulting to previous behavior) by adding following: * new optional no-extension argument for subscriber-create-on-demand vty command * db unit tests * vty test Note: using the db made with new code might result in subscribers with empty extension. Such subscribers cannot be deleted using old code. Make sure not to mix db versions or manually fix it by editing sqlite with external program. Fixes: OS#1658 Change-Id: Ibbc2e88e4722b08854ebc631485f19ed56443cbb
Diffstat (limited to 'openbsc/src/libmsc/ctrl_commands.c')
-rw-r--r--openbsc/src/libmsc/ctrl_commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c
index a02db36b9..79e136d52 100644
--- a/openbsc/src/libmsc/ctrl_commands.c
+++ b/openbsc/src/libmsc/ctrl_commands.c
@@ -25,6 +25,8 @@
#include <openbsc/db.h>
#include <openbsc/debug.h>
+#include <stdbool.h>
+
static bool alg_supported(const char *alg)
{
/*
@@ -96,9 +98,7 @@ 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,
- net->ext_min,
- net->ext_max);
+ subscr = subscr_create_subscriber(net->subscr_group, imsi);
if (!subscr)
goto fail;