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
diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index e09a029..1cefe37 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -1222,8 +1222,10 @@
 	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 @@
 	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;