diff options
author | Jonathan Santos <jrsantos@jonathanrsantos.com> | 2011-08-17 15:33:57 -0400 |
---|---|---|
committer | Jonathan Santos <jrsantos@jonathanrsantos.com> | 2011-08-17 15:33:57 -0400 |
commit | 5a45b156d4165fed159a290c46676d1383ffcc80 (patch) | |
tree | 3689fb40b5b432140fd48822973b760af93080a6 /src/osmo-bsc_mgcp | |
parent | 03fd8d014f9871896a86534432c8757d65a576fe (diff) |
New upstream version 0.9.14upstream/0.9.14
Diffstat (limited to 'src/osmo-bsc_mgcp')
-rw-r--r-- | src/osmo-bsc_mgcp/Makefile.am | 4 | ||||
-rw-r--r-- | src/osmo-bsc_mgcp/Makefile.in | 8 | ||||
-rw-r--r-- | src/osmo-bsc_mgcp/mgcp_main.c | 28 |
3 files changed, 21 insertions, 19 deletions
diff --git a/src/osmo-bsc_mgcp/Makefile.am b/src/osmo-bsc_mgcp/Makefile.am index 32cc81300..e6aae42d6 100644 --- a/src/osmo-bsc_mgcp/Makefile.am +++ b/src/osmo-bsc_mgcp/Makefile.am @@ -1,6 +1,6 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) -AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(COVERAGE_LDFLAGS) +AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) +AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(COVERAGE_LDFLAGS) bin_PROGRAMS = bsc_mgcp diff --git a/src/osmo-bsc_mgcp/Makefile.in b/src/osmo-bsc_mgcp/Makefile.in index 714fae3ac..afc2bc09a 100644 --- a/src/osmo-bsc_mgcp/Makefile.in +++ b/src/osmo-bsc_mgcp/Makefile.in @@ -36,7 +36,7 @@ bin_PROGRAMS = bsc_mgcp$(EXEEXT) subdir = src/osmo-bsc_mgcp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -108,6 +108,8 @@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBOSMOCORE_CFLAGS = @LIBOSMOCORE_CFLAGS@ LIBOSMOCORE_LIBS = @LIBOSMOCORE_LIBS@ +LIBOSMOGSM_CFLAGS = @LIBOSMOGSM_CFLAGS@ +LIBOSMOGSM_LIBS = @LIBOSMOGSM_LIBS@ LIBOSMOSCCP_CFLAGS = @LIBOSMOSCCP_CFLAGS@ LIBOSMOSCCP_LIBS = @LIBOSMOSCCP_LIBS@ LIBOSMOVTY_CFLAGS = @LIBOSMOVTY_CFLAGS@ @@ -177,8 +179,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) -AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(COVERAGE_LDFLAGS) +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) +AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(COVERAGE_LDFLAGS) bsc_mgcp_SOURCES = mgcp_main.c bsc_mgcp_LDADD = $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libmgcp/libmgcp.a \ diff --git a/src/osmo-bsc_mgcp/mgcp_main.c b/src/osmo-bsc_mgcp/mgcp_main.c index c8d9a625e..921fa09b2 100644 --- a/src/osmo-bsc_mgcp/mgcp_main.c +++ b/src/osmo-bsc_mgcp/mgcp_main.c @@ -32,16 +32,19 @@ #include <sys/socket.h> #include <openbsc/debug.h> -#include <osmocore/msgb.h> -#include <osmocore/talloc.h> -#include <osmocore/process.h> #include <openbsc/gsm_data.h> -#include <osmocore/select.h> #include <openbsc/mgcp.h> #include <openbsc/mgcp_internal.h> +#include <openbsc/vty.h> + +#include <osmocom/core/application.h> +#include <osmocom/core/msgb.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/process.h> +#include <osmocom/core/select.h> + #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/logging.h> -#include <openbsc/vty.h> #include <osmocom/vty/command.h> @@ -135,7 +138,7 @@ static int mgcp_change_cb(struct mgcp_trunk_config *cfg, int endpoint, int state return 0; } -static int read_call_agent(struct bsc_fd *fd, unsigned int what) +static int read_call_agent(struct osmo_fd *fd, unsigned int what) { struct sockaddr_in addr; socklen_t slen = sizeof(addr); @@ -193,14 +196,11 @@ int main(int argc, char **argv) struct gsm_network dummy_network; struct sockaddr_in addr; int on = 1, rc; - struct log_target *stderr_target; tall_bsc_ctx = talloc_named_const(NULL, 1, "mgcp-callagent"); - log_init(&log_info); - stderr_target = log_target_create_stderr(); - log_add_target(stderr_target); - log_set_all_filter(stderr_target, 1); + osmo_init_ignore_signals(); + osmo_init_logging(&log_info); cfg = mgcp_config_alloc(); if (!cfg) @@ -208,7 +208,7 @@ int main(int argc, char **argv) vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - logging_vty_add_cmds(); + logging_vty_add_cmds(&log_info); mgcp_vty_init(); handle_options(argc, argv); @@ -254,7 +254,7 @@ int main(int argc, char **argv) } - if (bsc_register_fd(&cfg->gw_fd.bfd) != 0) { + if (osmo_fd_register(&cfg->gw_fd.bfd) != 0) { LOGP(DMGCP, LOGL_FATAL, "Failed to register the fd\n"); return -1; } @@ -275,7 +275,7 @@ int main(int argc, char **argv) /* main loop */ while (1) { - bsc_select_main(0); + osmo_select_main(0); } |