aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/osmo-bsc_mgcp/mgcp_main.c')
-rw-r--r--openbsc/src/osmo-bsc_mgcp/mgcp_main.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
index 921fa09b2..ee1543cdb 100644
--- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
+++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
@@ -2,8 +2,8 @@
/* The main method to drive it as a standalone process */
/*
- * (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
- * (C) 2009 by On-Waves
+ * (C) 2009-2011 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2009-2011 by On-Waves
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -40,7 +40,6 @@
#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>
@@ -59,6 +58,7 @@ void subscr_put() { abort(); }
#warning "Make use of the rtp proxy code"
static struct mgcp_config *cfg;
+static struct mgcp_trunk_config *reset_trunk;
static int reset_endpoints = 0;
static int daemonize = 0;
@@ -122,9 +122,10 @@ static void handle_options(int argc, char **argv)
}
/* simply remember this */
-static int mgcp_rsip_cb(struct mgcp_config *cfg)
+static int mgcp_rsip_cb(struct mgcp_trunk_config *tcfg)
{
reset_endpoints = 1;
+ reset_trunk = tcfg;
return 0;
}
@@ -171,12 +172,14 @@ static int read_call_agent(struct osmo_fd *fd, unsigned int what)
}
if (reset_endpoints) {
- LOGP(DMGCP, LOGL_NOTICE, "Asked to reset endpoints.\n");
+ LOGP(DMGCP, LOGL_NOTICE,
+ "Asked to reset endpoints: %d/%d\n",
+ reset_trunk->trunk_nr, reset_trunk->trunk_type);
reset_endpoints = 0;
/* is checking in_addr.s_addr == INADDR_LOOPBACK making it more secure? */
- for (i = 1; i < cfg->trunk.number_endpoints; ++i)
- mgcp_free_endp(&cfg->trunk.endpoints[i]);
+ for (i = 1; i < reset_trunk->number_endpoints; ++i)
+ mgcp_free_endp(&reset_trunk->endpoints[i]);
}
return 0;