dect
/
asterisk
Archived
13
0
Fork 0

Make sure it's really a dotted IP (bug #2198)

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3562 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2004-08-01 18:26:41 +00:00
parent 91dcb8fa34
commit a91fe8913a
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) {