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:51:12 +0000 (17:51 +0000)
committerSean Bright <sean@malleable.com>
Sun, 19 Feb 2012 17:51:12 +0000 (17:51 +0000)
Without this, the call to ast_sockaddr_set_port a few lines later is a noop.
........

Merged revisions 355901 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 355902 from http://svn.asterisk.org/svn/asterisk/branches/10

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

channels/chan_iax2.c

index de9fe8a..94c5ece 100644 (file)
@@ -12407,6 +12407,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);
        }