fix port number handling in peer building functions

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-11-21 19:27:26 +00:00
parent 2424305562
commit e9cde1fbdb
3 changed files with 11 additions and 3 deletions

View File

@@ -12100,8 +12100,11 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int
}
if (!strcasecmp(v->name, "outboundproxy"))
obproxyfound=1;
else
else {
ast_copy_string(peer->tohost, v->value, sizeof(peer->tohost));
if (!peer->addr.sin_port)
peer->addr.sin_port = htons(DEFAULT_SIP_PORT);
}
}
} else if (!strcasecmp(v->name, "defaultip")) {
if (ast_get_ip(&peer->defaddr, v->value)) {