[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...
This commit is contained in:
Holger Hans Peter Freyther 2010-03-30 13:00:10 +02:00
parent f5b6aa60ce
commit 95e4d34f06
1 changed files with 5 additions and 0 deletions

View File

@ -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;