]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Set the length of the ast_sockaddr, so that we can set it's port later.
authorSean Bright <sean@malleable.com>
Sun, 19 Feb 2012 17:49:45 +0000 (17:49 +0000)
committerSean Bright <sean@malleable.com>
Sun, 19 Feb 2012 17:49:45 +0000 (17:49 +0000)
Without this, the call to ast_sockaddr_set_port a few lines later is a noop.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355901 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 69723e5af49fdf3f36da37eebe922bb8970df98c..df0af0d9ff03c8a0431c6948ce69d2f877508f29 100644 (file)
@@ -12388,6 +12388,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
                peer->pokeexpire = -1;
                peer->sockfd = defaultsockfd;
                peer->addr.ss.ss_family = AF_INET;
+               peer->addr.len = sizeof(struct sockaddr_in);
                if (ast_string_field_init(peer, 32))
                        peer = peer_unref(peer);
        }