aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r--openbsc/src/gprs/gb_proxy_main.c20
-rw-r--r--openbsc/src/gprs/gb_proxy_vty.c2
-rw-r--r--openbsc/src/gprs/sgsn_main.c20
-rw-r--r--openbsc/src/gprs/sgsn_vty.c2
4 files changed, 16 insertions, 28 deletions
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c
index 9cd73e17d..e450d1fe6 100644
--- a/openbsc/src/gprs/gb_proxy_main.c
+++ b/openbsc/src/gprs/gb_proxy_main.c
@@ -205,12 +205,18 @@ int main(int argc, char **argv)
log_add_target(stderr_target);
log_set_all_filter(stderr_target, 1);
- telnet_init(&dummy_network, 4246);
+ vty_init("Osmocom Gb Proxy", PACKAGE_VERSION, openbsc_copyright);
+ openbsc_vty_add_cmds();
+ gbproxy_vty_init();
handle_options(argc, argv);
rate_ctr_init(tall_bsc_ctx);
+ rc = telnet_init(tall_bsc_ctx, &dummy_network, 4246);
+ if (rc < 0)
+ exit(1);
+
bssgp_nsi = gprs_ns_instantiate(&proxy_ns_cb);
if (!bssgp_nsi) {
LOGP(DGPRS, LOGL_ERROR, "Unable to instantiate NS\n");
@@ -247,15 +253,3 @@ int main(int argc, char **argv)
exit(0);
}
-
-struct gsm_network;
-int bsc_vty_init(struct gsm_network *dummy)
-{
- cmd_init(1);
- vty_init("Osmocom Gb Proxy", PACKAGE_VERSION, openbsc_copyright);
-
- openbsc_vty_add_cmds();
- gbproxy_vty_init();
- return 0;
-}
-
diff --git a/openbsc/src/gprs/gb_proxy_vty.c b/openbsc/src/gprs/gb_proxy_vty.c
index a8501d11c..7ee2833ed 100644
--- a/openbsc/src/gprs/gb_proxy_vty.c
+++ b/openbsc/src/gprs/gb_proxy_vty.c
@@ -175,7 +175,7 @@ int gbproxy_parse_config(const char *config_file, struct gbproxy_config *cfg)
int rc;
g_cfg = cfg;
- rc = vty_read_config_file(config_file);
+ rc = vty_read_config_file(config_file, NULL);
if (rc < 0) {
fprintf(stderr, "Failed to parse the config file: '%s'\n", config_file);
return rc;
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
index 81b130b12..aaad654e6 100644
--- a/openbsc/src/gprs/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -138,8 +138,14 @@ int main(int argc, char **argv)
log_add_target(stderr_target);
log_set_all_filter(stderr_target, 1);
+ vty_init("Osmocom SGSN", PACKAGE_VERSION, openbsc_copyright);
+ openbsc_vty_add_cmds();
+ sgsn_vty_init();
+
rate_ctr_init(tall_bsc_ctx);
- telnet_init(&dummy_network, 4245);
+ rc = telnet_init(tall_bsc_ctx, &dummy_network, 4245);
+ if (rc < 0)
+ exit(1);
sgsn_nsi = gprs_ns_instantiate(&sgsn_ns_cb);
if (!sgsn_nsi) {
@@ -166,15 +172,3 @@ int main(int argc, char **argv)
exit(0);
}
-
-struct gsm_network;
-int bsc_vty_init(struct gsm_network *dummy)
-{
- cmd_init(1);
- vty_init("Osmocom SGSN", PACKAGE_VERSION, openbsc_copyright);
-
- openbsc_vty_add_cmds();
- sgsn_vty_init();
- return 0;
-}
-
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index d56a27904..c16e1912f 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -139,7 +139,7 @@ int sgsn_parse_config(const char *config_file, struct sgsn_config *cfg)
int rc;
g_cfg = cfg;
- rc = vty_read_config_file(config_file);
+ rc = vty_read_config_file(config_file, NULL);
if (rc < 0) {
fprintf(stderr, "Failed to parse the config file: '%s'\n", config_file);
return rc;