Fix parsing of IPv6 address literals in outboundproxy

(closes issue #17757)
Reported by: oej
Patches:
      17757.diff uploaded by sperreault (license 252)
      sip.conf.diff uploaded by sperreault (license 252)
Tested by: oej


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@281687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2010-08-11 13:30:59 +00:00
parent 7011a94fc0
commit 5c1c1b35bd
4 changed files with 34 additions and 8 deletions

View File

@@ -118,7 +118,7 @@ char *ast_sockaddr_stringify_fmt(const struct ast_sockaddr *sa, int format)
return ast_str_buffer(str);
}
int static _ast_sockaddr_parse(char *str, char **host, char **port, int flags)
int ast_sockaddr_split_hostport(char *str, char **host, char **port, int flags)
{
char *s = str;
@@ -187,7 +187,7 @@ int ast_sockaddr_parse(struct ast_sockaddr *addr, const char *str, int flags)
int e;
s = ast_strdupa(str);
if (!_ast_sockaddr_parse(s, &host, &port, flags)) {
if (!ast_sockaddr_split_hostport(s, &host, &port, flags)) {
return 0;
}
@@ -233,7 +233,7 @@ int ast_sockaddr_resolve(struct ast_sockaddr **addrs, const char *str,
int e, i, res_cnt;
s = ast_strdupa(str);
if (!_ast_sockaddr_parse(s, &host, &port, flags)) {
if (!ast_sockaddr_split_hostport(s, &host, &port, flags)) {
return 0;
}