Make sure that we have the sin_family set to AF_INET for FreeBSD
authorMark Spencer <markster@digium.com>
Sun, 16 May 2004 05:53:33 +0000 (05:53 +0000)
committerMark Spencer <markster@digium.com>
Sun, 16 May 2004 05:53:33 +0000 (05:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2975 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index b35c998..95161de 100755 (executable)
@@ -7163,6 +7163,7 @@ static struct sip_peer *temp_peer(char *name)
        strncpy(peer->language, language, sizeof(peer->language)-1);
        strncpy(peer->musicclass, globalmusicclass, sizeof(peer->musicclass)-1);
        peer->addr.sin_port = htons(DEFAULT_SIP_PORT);
+       peer->addr.sin_family = AF_INET;
        peer->expiry = expiry;
        peer->capability = capability;
        /* Assume can reinvite */
@@ -7218,6 +7219,8 @@ static struct sip_peer *build_peer(char *name, struct ast_variable *v)
                        strncpy(peer->language, language, sizeof(peer->language)-1);
                        strncpy(peer->musicclass, globalmusicclass, sizeof(peer->musicclass)-1);
                        peer->addr.sin_port = htons(DEFAULT_SIP_PORT);
+                       peer->addr.sin_family = AF_INET;
+                       peer->defaddr.sin_family = AF_INET;
                        peer->expiry = expiry;
                }
                oldha = peer->ha;