Make sure it's really a dotted IP (bug #2198)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
e094bf07dc
commit
358ff9f7d6
|
@ -3417,7 +3417,7 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
|
|||
ast_mutex_init(&gw->msgs_lock);
|
||||
strncpy(gw->name, cat, sizeof(gw->name) - 1);
|
||||
/* SC: check if the name is numeric ip */
|
||||
if (inet_addr(gw->name) != INADDR_NONE)
|
||||
if ((strchr(gw->name, '.')) && inet_addr(gw->name) != INADDR_NONE)
|
||||
gw->isnamedottedip = 1;
|
||||
}
|
||||
while(v) {
|
||||
|
|
Loading…
Reference in New Issue