aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_msc.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-27 14:20:24 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-27 18:12:03 +0100
commit1dde661dd6653f21ddb003f203f8a23f201d68c9 (patch)
tree268560908c700e5cd20ab6dc589b7dbbbea3c337 /openbsc/src/osmo-bsc/osmo_bsc_msc.c
parent122b6331927dd65d716d71cdf8fcb728cc2475f9 (diff)
osmo-bsc: Add configurable option to spawn + respawn osmo-bsc_mgcplaforge/mgcp-rework
If it is configured in the config file or on the VTY, osmo-bsc will fork+exec osmo-bsc_mgcp. Furthermore, if osmo-bsc_mgcp dies, osmo-bsc will re-spawn it. This also means that we can now send a SIGHUP to osmo-bsc_mgcp in the event of a Msc (re)connect, causing it to send RSIP, which in turn is required by certain call agents that forget to send a AUEP on startup to determine the endpoint state of the media gateway[s].
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_msc.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_msc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
index 04cfb997d..68c469946 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
@@ -37,6 +37,7 @@
#include <osmocom/abis/ipa.h>
#include <sys/socket.h>
+#include <sys/signal.h>
#include <netinet/tcp.h>
#include <unistd.h>
@@ -342,6 +343,10 @@ static void msc_connection_connected(struct bsc_msc_connection *con)
data = (struct osmo_msc_data *) con->write_queue.bfd.data;
msc_ping_timeout_cb(data);
+ /* notify bsc_mgcp to reset all end-points */
+ if (data->bsc_mgcp.pid)
+ kill(data->bsc_mgcp.pid, SIGHUP);
+
sig.data = data;
osmo_signal_dispatch(SS_MSC, S_MSC_CONNECTED, &sig);
}