Fix calls to ast_get_ip() not initializing the address family.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@346239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2011-11-23 22:52:59 +00:00
parent 546e7517c5
commit 20e75b7ad2
5 changed files with 25 additions and 18 deletions

View File

@@ -12258,7 +12258,8 @@ static int peer_set_srcaddr(struct iax2_peer *peer, const char *srcaddr)
if (port < 1)
port = IAX_DEFAULT_PORTNO;
}
sin_tmp.ss.ss_family = AF_INET;
if (!ast_get_ip(&sin_tmp, addr)) {
struct ast_netsock *sock;
int res;
@@ -12475,6 +12476,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
} else if (!strcasecmp(v->name, "defaultip")) {
struct ast_sockaddr peer_defaddr_tmp;
peer_defaddr_tmp.ss.ss_family = AF_INET;
if (ast_get_ip(&peer_defaddr_tmp, v->value)) {
return peer_unref(peer);
}