aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libmsc/msc_vty.c6
-rw-r--r--src/osmo-msc/msc_main.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 06e11394a..87adc82de 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -466,6 +466,12 @@ DEFUN(cfg_msc_ipa_name,
"This name is used for GSUP routing and must be set if more than one MSC is connected to the HLR. "
"The default is 'MSC-00-00-00-00-00-00'.\n")
{
+ if (!msc_parsing_config_file) {
+ vty_out(vty, "The IPA name cannot be changed at run-time; "
+ "It can only be set in the configuraton file.%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
gsmnet->msc_ipa_name = talloc_strdup(gsmnet, argv[0]);
return CMD_SUCCESS;
}
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 8500b9722..ce6ae380f 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -24,6 +24,7 @@
*
*/
+#include <stdbool.h>
#include <unistd.h>
#include <time.h>
#include <errno.h>
@@ -514,6 +515,8 @@ extern void *tall_gsms_ctx;
extern void *tall_call_ctx;
extern void *tall_trans_ctx;
+bool msc_parsing_config_file = false;
+
int main(int argc, char **argv)
{
int rc;
@@ -566,7 +569,9 @@ int main(int argc, char **argv)
return -1;
#endif
+ msc_parsing_config_file = true;
rc = vty_read_config_file(msc_cmdline_config.config_file, NULL);
+ msc_parsing_config_file = false;
if (rc < 0) {
LOGP(DMSC, LOGL_FATAL, "Failed to parse the config file: '%s'\n",
msc_cmdline_config.config_file);