There isn't much point in saving off and restoring a value that we never use again.
authorSean Bright <sean@malleable.com>
Mon, 27 Feb 2012 16:12:51 +0000 (16:12 +0000)
committerSean Bright <sean@malleable.com>
Mon, 27 Feb 2012 16:12:51 +0000 (16:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356966 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index fba55dc..543726c 100644 (file)
@@ -12332,11 +12332,9 @@ static int peer_set_srcaddr(struct iax2_peer *peer, const char *srcaddr)
                                sockfd = ast_netsock_sockfd(sock);
                                nonlocal = 0;
                        } else {
-                               unsigned int orig_saddr = sin.sin_addr.s_addr;
                                /* INADDR_ANY matches anyway! */
                                sin.sin_addr.s_addr = INADDR_ANY;
                                if (ast_netsock_find(netsock, &sin)) {
-                                       sin.sin_addr.s_addr = orig_saddr;
                                        sock = ast_netsock_bind(outsock, io, srcaddr, port, qos.tos, qos.cos, socket_read, NULL);
                                        if (sock) {
                                                sockfd = ast_netsock_sockfd(sock);