diff options
Diffstat (limited to 'openbsc/src/mgcp/mgcp_main.c')
-rw-r--r-- | openbsc/src/mgcp/mgcp_main.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/openbsc/src/mgcp/mgcp_main.c b/openbsc/src/mgcp/mgcp_main.c index fd03c9943..63955e7d5 100644 --- a/openbsc/src/mgcp/mgcp_main.c +++ b/openbsc/src/mgcp/mgcp_main.c @@ -193,7 +193,9 @@ int main(int argc, char** argv) if (!cfg) return -1; - telnet_init(&dummy_network, 4243); + vty_init("OpenBSC MGCP", PACKAGE_VERSION, openbsc_copyright); + openbsc_vty_add_cmds(); + mgcp_vty_init(); handle_options(argc, argv); @@ -201,6 +203,10 @@ int main(int argc, char** argv) if (rc < 0) return rc; + rc = telnet_init(tall_bsc_ctx, &dummy_network, 4243); + if (rc < 0) + return rc; + /* set some callbacks */ cfg->reset_cb = mgcp_rsip_cb; cfg->change_cb = mgcp_change_cb; @@ -253,15 +259,3 @@ int main(int argc, char** argv) return 0; } - -struct gsm_network; -int bsc_vty_init(struct gsm_network *dummy) -{ - cmd_init(1); - vty_init("OpenBSC MGCP", PACKAGE_VERSION, openbsc_copyright); - - openbsc_vty_add_cmds(); - mgcp_vty_init(); - return 0; -} - |