aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-30 12:43:53 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-30 12:43:53 +0200
commit9d24578812934278371591e78824ef127f5d684f (patch)
tree27e1d9f2c91a5c27bd9318f987538f2d26aa0466
parenta087c4e75de4ec309467a9467324d2afa6cff09f (diff)
[mgcp] Move mgcp init into the main method...
-rw-r--r--openbsc/src/mgcp/mgcp_main.c17
-rw-r--r--openbsc/src/mgcp/mgcp_vty.c10
2 files changed, 15 insertions, 12 deletions
diff --git a/openbsc/src/mgcp/mgcp_main.c b/openbsc/src/mgcp/mgcp_main.c
index 5773bc7ad..bb4d7dce0 100644
--- a/openbsc/src/mgcp/mgcp_main.c
+++ b/openbsc/src/mgcp/mgcp_main.c
@@ -40,6 +40,8 @@
#include <openbsc/mgcp.h>
#include <openbsc/telnet_interface.h>
+#include <vty/command.h>
+
#include "../../bscconfig.h"
/* this is here for the vty... it will never be called */
@@ -74,7 +76,7 @@ static void print_help()
printf(" -c --config-file filename The config file to use.\n");
}
-static void print_version()
+static void print_mgcp_version()
{
printf("%s\n\n", openbsc_version);
printf("%s", openbsc_copyright);
@@ -105,7 +107,7 @@ static void handle_options(int argc, char** argv)
config_file = talloc_strdup(tall_bsc_ctx, optarg);
break;
case 'V':
- print_version();
+ print_mgcp_version();
exit(0);
break;
default:
@@ -235,3 +237,14 @@ int main(int argc, char** argv)
return 0;
}
+
+struct gsm_network;
+int bsc_vty_init(struct gsm_network *dummy)
+{
+ cmd_init(1);
+ vty_init();
+
+ mgcp_vty_init();
+ return 0;
+}
+
diff --git a/openbsc/src/mgcp/mgcp_vty.c b/openbsc/src/mgcp/mgcp_vty.c
index f13b3cfa7..ac8e873d3 100644
--- a/openbsc/src/mgcp/mgcp_vty.c
+++ b/openbsc/src/mgcp/mgcp_vty.c
@@ -327,13 +327,3 @@ int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg)
return !!g_cfg->forward_ip;
}
-struct gsm_network;
-int bsc_vty_init(struct gsm_network *dummy)
-{
- cmd_init(1);
- vty_init();
-
- mgcp_vty_init();
- return 0;
-}
-