summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2016-06-09 08:20:33 -0600
committerGeorge Joseph <gjoseph@digium.com>2016-06-09 09:50:31 -0500
commitd21a77b325d814eca76290b11a276199841d8bfa (patch)
tree1cb361fbc0d0c5058a46acd4d7a2d40c0b7d0214 /channels/chan_sip.c
parentfbece11a0c3b6bf7610f3523a6876a065c595ffc (diff)
build: Fix ast_sockaddr initialization to be more portable
A change to glibc 2.22 changed the order of the sockadddr_storage members which caused the places where we do an initialization of ast_sockaddr with '{ { 0, 0, } }' to fail compilation. Those initializers (which we shouldn't have been using anyway) have been replaced with memsets. Change-Id: Idd1b3b320903d8771bfe221f0b015685de628fa4
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index eec904f57..4c3516d8c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15790,11 +15790,12 @@ static void start_register_timeout(struct sip_registry *reg)
static const char *sip_sanitized_host(const char *host)
{
- struct ast_sockaddr addr = { { 0, 0, }, };
+ struct ast_sockaddr addr;
/* peer/sip_pvt->tohost and sip_registry->hostname should never have a port
* in them, so we use PARSE_PORT_FORBID here. If this lookup fails, we return
* the original host which is most likely a host name and not an IP. */
+ memset(&addr, 0, sizeof(addr));
if (!ast_sockaddr_parse(&addr, host, PARSE_PORT_FORBID)) {
return host;
}