aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-30 13:00:10 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-30 15:35:57 +0200
commit95e4d34f06567521087121fb5fbdc0f9c9d48ae7 (patch)
tree3ad450fdae5e25d95bcb2fb3ad766428595302b4
parentf5b6aa60ce3b74ba615d75e6a8e88b78d84345b1 (diff)
[mgcp] The networking code needs a source addrs..
Make the source address mandantory and complain about complain when it is missing. The address is mandantory as it needs to be put into the MGCP messages...
-rw-r--r--openbsc/src/mgcp/mgcp_vty.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/mgcp/mgcp_vty.c b/openbsc/src/mgcp/mgcp_vty.c
index ac8e873d3..6773d889f 100644
--- a/openbsc/src/mgcp/mgcp_vty.c
+++ b/openbsc/src/mgcp/mgcp_vty.c
@@ -274,6 +274,11 @@ int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg)
if (!g_cfg->bts_ip)
fprintf(stderr, "No BTS ip address specified. This will allow everyone to connect.\n");
+ if (!g_cfg->source_addr) {
+ fprintf(stderr, "You need to specify a bind address.\n");
+ return -1;
+ }
+
if (mgcp_endpoints_allocate(g_cfg) != 0) {
fprintf(stderr, "Failed to allocate endpoints: %d. Quitting.\n", g_cfg->number_endpoints);
return -1;