diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-07-20 14:41:20 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-08-27 17:40:53 +0200 |
commit | c9a352f4164ae9054d83a037323138437d0d5a22 (patch) | |
tree | 22c8166553927b07db0f86a9c1a15b08d13c2dea /src/gprs/sgsn_vty.c | |
parent | ce67be1910b19c01275f8f73a9806ac3e5d6f43d (diff) |
sgsn init: pass sgsn_config pointer to sgsn_vty_init(), not sgsn_parse_config
In an upcoming commit, sgsn_vty_init() will require access to the global sgsn
config struct to initialize a generic VTY command with the proper config
destination address, see Change-Id I5b5b6a9678b458affa86800afb1ec726e66eed88.
Change-Id: Ie6b6e5422987586531a898e0c5b867623dbecb0f
Diffstat (limited to 'src/gprs/sgsn_vty.c')
-rw-r--r-- | src/gprs/sgsn_vty.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index e09a0296b..1cefe37cf 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -1222,8 +1222,10 @@ DEFUN(cfg_comp_v42bisp, cfg_comp_v42bisp_cmd, return CMD_SUCCESS; } -int sgsn_vty_init(void) +int sgsn_vty_init(struct sgsn_config *cfg) { + g_cfg = cfg; + install_element_ve(&show_sgsn_cmd); //install_element_ve(&show_mmctx_tlli_cmd); install_element_ve(&show_mmctx_imsi_cmd); @@ -1285,11 +1287,12 @@ int sgsn_vty_init(void) return 0; } -int sgsn_parse_config(const char *config_file, struct sgsn_config *cfg) +int sgsn_parse_config(const char *config_file) { int rc; - g_cfg = cfg; + /* make sure sgsn_vty_init() was called before this */ + OSMO_ASSERT(g_cfg); g_cfg->timers.T3312 = GSM0408_T3312_SECS; g_cfg->timers.T3322 = GSM0408_T3322_SECS; |