From: Matthew Jordan Date: Tue, 5 Nov 2013 21:16:28 +0000 (+0000) Subject: chan_sip: Use AST_AF* defined constant when calling ast_get_ip X-Git-Tag: 12.0.0-beta2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d66d14d4d1987c306c762985acc2259710b34b9;p=thirdparty%2Fasterisk.git chan_sip: Use AST_AF* defined constant when calling ast_get_ip While the structure passed to ast_get_ip should be set memset to 0, thus initializing the ss_family member to 0, explicitly setting it to AST_AF_UNSPEC is more portable. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402507 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d143dc1387..3b21d9f379 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -30731,6 +30731,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str srvlookup = v->value; } } else if (!strcasecmp(v->name, "defaultip")) { + peer->defaddr.ss.ss_family = AST_AF_UNSPEC; if (!ast_strlen_zero(v->value) && ast_get_ip(&peer->defaddr, v->value)) { sip_unref_peer(peer, "sip_unref_peer: from build_peer defaultip"); return NULL;