diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-19 15:03:39 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-20 14:05:17 +0100 |
commit | 338fa562c0a8be518182d62e22de89a3e429fdb4 (patch) | |
tree | 05a21369b5d7791d1ae3221902d3a0c3f90e341e /openbsc/src | |
parent | 1cf9cf3eebdd0fce1d81feae3bb12f7f03932b0b (diff) |
[mgcp] Add telnet interface for mgcp.
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/Makefile.am | 2 | ||||
-rw-r--r-- | openbsc/src/bsc_mgcp.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am index 7651132b6..d28c80354 100644 --- a/openbsc/src/Makefile.am +++ b/openbsc/src/Makefile.am @@ -34,5 +34,5 @@ ipaccess_config_LDADD = libbsc.a libmsc.a libbsc.a libvty.a -ldl -ldbi $(LIBCRYP isdnsync_SOURCES = isdnsync.c -bsc_mgcp_SOURCES = bsc_mgcp.c msgb.c talloc.c debug.c select.c timer.c +bsc_mgcp_SOURCES = bsc_mgcp.c msgb.c talloc.c debug.c select.c timer.c telnet_interface.c bsc_mgcp_LDADD = libvty.a diff --git a/openbsc/src/bsc_mgcp.c b/openbsc/src/bsc_mgcp.c index c7db3bf3d..df9564140 100644 --- a/openbsc/src/bsc_mgcp.c +++ b/openbsc/src/bsc_mgcp.c @@ -38,13 +38,13 @@ #include <openbsc/gsm_data.h> #include <openbsc/select.h> #include <openbsc/mgcp.h> +#include <openbsc/telnet_interface.h> #include <vty/command.h> #include <vty/vty.h> /* this is here for the vty... it will never be called */ void subscr_put() { abort(); } -void vty_event() { } #define _GNU_SOURCE #include <getopt.h> @@ -1019,7 +1019,7 @@ DEFUN(cfg_mgcp_loop, return CMD_SUCCESS; } -static void mgcp_vty_init() +int bsc_vty_init(struct gsm_network *dummy) { cmd_init(1); vty_init(); @@ -1036,17 +1036,19 @@ static void mgcp_vty_init() install_element(MGCP_NODE, &cfg_mgcp_sdp_payload_number_cmd); install_element(MGCP_NODE, &cfg_mgcp_sdp_payload_name_cmd); install_element(MGCP_NODE, &cfg_mgcp_loop_cmd); + return 0; } int main(int argc, char** argv) { + struct gsm_network dummy_network; struct sockaddr_in addr; int on = 1, i, rc; tall_bsc_ctx = talloc_named_const(NULL, 1, "mgcp-callagent"); handle_options(argc, argv); - mgcp_vty_init(); + telnet_init(&dummy_network, 4243); rc = vty_read_config_file(config_file); if (rc < 0) { fprintf(stderr, "Failed to parse the config file: '%s'\n", config_file); |