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:
Mark Spencer 2004-08-01 18:26:41 +00:00
parent e094bf07dc
commit 358ff9f7d6
1 changed files with 1 additions and 1 deletions

View File

@ -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) {