Resolve crashes when using SIP TCP/TLS with qualify.
authorRussell Bryant <russell@russellbryant.com>
Fri, 12 Dec 2008 18:19:47 +0000 (18:19 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 12 Dec 2008 18:19:47 +0000 (18:19 +0000)
The problem was a reference count error on the tcptls_session structure.

(closes issue #13989)
Reported by: Nugget

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

channels/chan_sip.c

index ae9e99c..83f5d49 100644 (file)
@@ -21115,7 +21115,7 @@ static int sip_poke_peer(struct sip_peer *peer, int force)
        
        p->sa = peer->addr;
        p->recv = peer->addr;
-       p->socket = peer->socket;
+       copy_socket_data(&p->socket, &peer->socket);
        ast_copy_flags(&p->flags[0], &peer->flags[0], SIP_FLAGS_TO_COPY);
        ast_copy_flags(&p->flags[1], &peer->flags[1], SIP_PAGE2_FLAGS_TO_COPY);