]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix MGCP build, SIP should destroy on temponly, not on show peer
authorMark Spencer <markster@digium.com>
Tue, 12 Oct 2004 21:51:08 +0000 (21:51 +0000)
committerMark Spencer <markster@digium.com>
Tue, 12 Oct 2004 21:51:08 +0000 (21:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3985 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_mgcp.c
channels/chan_sip.c

index b81f8058cf59a5b656a3a62fc2fbbc593e12d2af..fd4aff6a8a048b8a6dd6b538f414fadecc5a142c 100755 (executable)
@@ -1951,7 +1951,7 @@ static int transmit_modify_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp
        add_header(&resp, "X", sub->txident);
        add_header(&resp, "I", sub->cxident);
        /*add_header(&resp, "S", "");*/
-       ast_rtp_offered_from_local(rtp, 0);
+       ast_rtp_offered_from_local(sub->rtp, 0);
        add_sdp(&resp, sub, rtp);
     /* SC: fill in new fields */
     resp.cmd = MGCP_CMD_MDCX;
@@ -1985,7 +1985,7 @@ static int transmit_connect_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp
     /* SC: X header should not be sent. kept for compatibility */
        add_header(&resp, "X", sub->txident);
        /*add_header(&resp, "S", "");*/
-       ast_rtp_offered_from_local(rtp, 1);
+       ast_rtp_offered_from_local(sub->rtp, 1);
        add_sdp(&resp, sub, rtp);
     /* SC: fill in new fields */
     resp.cmd = MGCP_CMD_CRCX;
index 83e88526388ed18b0c9164100e8fc20a1d86736b..4f333694e4bb6a21c1bf9e5848348000c3dac7d0 100755 (executable)
@@ -5749,7 +5749,7 @@ static int sip_show_peer(int fd, int argc, char *argv[])
 
        ast_mutex_unlock(&peerl.lock);
 
-       if (peer && peer->dynamic) {
+       if (peer && peer->temponly) {
                destroy_peer(peer);
        }
        return RESULT_SUCCESS;