Fix MGCP build, SIP should destroy on temponly, not on show peer

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Mark Spencer 21 years ago
parent 9dde51a708
commit bf63baa047

@ -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, "X", sub->txident);
add_header(&resp, "I", sub->cxident); add_header(&resp, "I", sub->cxident);
/*add_header(&resp, "S", "");*/ /*add_header(&resp, "S", "");*/
ast_rtp_offered_from_local(rtp, 0); ast_rtp_offered_from_local(sub->rtp, 0);
add_sdp(&resp, sub, rtp); add_sdp(&resp, sub, rtp);
/* SC: fill in new fields */ /* SC: fill in new fields */
resp.cmd = MGCP_CMD_MDCX; 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 */ /* SC: X header should not be sent. kept for compatibility */
add_header(&resp, "X", sub->txident); add_header(&resp, "X", sub->txident);
/*add_header(&resp, "S", "");*/ /*add_header(&resp, "S", "");*/
ast_rtp_offered_from_local(rtp, 1); ast_rtp_offered_from_local(sub->rtp, 1);
add_sdp(&resp, sub, rtp); add_sdp(&resp, sub, rtp);
/* SC: fill in new fields */ /* SC: fill in new fields */
resp.cmd = MGCP_CMD_CRCX; resp.cmd = MGCP_CMD_CRCX;

@ -5749,7 +5749,7 @@ static int sip_show_peer(int fd, int argc, char *argv[])
ast_mutex_unlock(&peerl.lock); ast_mutex_unlock(&peerl.lock);
if (peer && peer->dynamic) { if (peer && peer->temponly) {
destroy_peer(peer); destroy_peer(peer);
} }
return RESULT_SUCCESS; return RESULT_SUCCESS;

Loading…
Cancel
Save