aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gsm_data.h
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/include/openbsc/gsm_data.h
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/include/openbsc/gsm_data.h')
-rw-r--r--openbsc/include/openbsc/gsm_data.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index e7cd520d2..bdcd0e0dc 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <regex.h>
#include <sys/types.h>
+#include <stdbool.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/select.h>
@@ -21,12 +22,6 @@ struct gsm_subscriber_group;
#define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3]
-enum gsm_subscr_creation_mode {
- GSM_SUBSCR_DONT_CREATE = 0,
- GSM_SUBSCR_CREAT_W_RAND_EXT = 1,
- GSM_SUBSCR_CREAT_W_REGEXP = 2,
-};
-
enum gsm_security_event {
GSM_SECURITY_NOAVAIL,
GSM_SECURITY_AUTH_FAILED,
@@ -289,7 +284,8 @@ struct gsm_network {
struct osmo_bsc_data *bsc_data;
/* subscriber related features */
- int subscr_creation_mode;
+ bool auto_create_subscr;
+ bool auto_assign_exten;
uint64_t ext_min;
uint64_t ext_max;
struct gsm_subscriber_group *subscr_group;