aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-msc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-12-05 01:11:28 +0100
committerHarald Welte <laforge@gnumonks.org>2018-12-05 19:35:11 +0000
commit80447ebe6c372821319c78e2fae55b98c8e16e40 (patch)
tree39535cb7ad04c9929b3329481a516fea6c4f4192 /src/osmo-msc
parent05c5680ba16c9a393595e03249a0c5bf4bec0033 (diff)
add VTY commands: mncc internal / external (== -M)
So far the only way to use external MNCC is to pass the -M cmdline arg: osmo-msc -M /path/to/socket However, the osmo-msc.service file for systemd is installed by 'make install', and hence it is quite impractical to depend on such a config item to be required in the service file: - It defies any scheme an operator may have in place to compose the osmo-msc.cfg file -- this option doesn't go in the .cfg file but needs separate action to add to the installed service file. - After a make install or package upgrades / re-installations, this option will be plain overwritten silently, or lead to the need for resolving file conflicts. The initial spark for this came from configuring the 35c3 GSM from cfg templates. Change-Id: I2ec59d5eba407f83295528b51b93678d446b9cee
Diffstat (limited to 'src/osmo-msc')
-rw-r--r--src/osmo-msc/msc_main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 157d5ae56..8500b9722 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -573,11 +573,20 @@ int main(int argc, char **argv)
return 1;
}
- /* Initialize MNCC socket if appropriate */
+ /* Initialize MNCC socket if appropriate. If the cmdline option -M is present, it overrides the .cfg file
+ * setting 'msc' / 'mncc external MNCC_SOCKET_PATH'. Note that when -M is given, it "bleeds" back into the vty
+ * 'write' command and is reflected in the written out 'mncc external' cfg. */
if (msc_cmdline_config.mncc_sock_path) {
+ LOGP(DMNCC, LOGL_NOTICE,
+ "MNCC socket path is configured from commandline argument -M."
+ " This affects a written-back config file. Instead consider using the config file directly"
+ " ('msc' / 'mncc external MNCC_SOCKET_PATH').\n");
+ gsm_network_set_mncc_sock_path(msc_network, msc_cmdline_config.mncc_sock_path);
+ }
+ if (msc_network->mncc_sock_path) {
msc_network->mncc_recv = mncc_sock_from_cc;
rc = mncc_sock_init(msc_network,
- msc_cmdline_config.mncc_sock_path);
+ msc_network->mncc_sock_path);
if (rc) {
fprintf(stderr, "MNCC socket initialization failed. exiting.\n");
exit(1);