diff options
author | Terry Wilson <twilson@digium.com> | 2010-07-13 21:42:42 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2010-07-13 21:42:42 +0000 |
commit | b42c6cab179cb477773f81aa2f08cb5195a0efc6 (patch) | |
tree | 04e6b5fd782323c9c70d1503c4634b2128d037b0 /channels | |
parent | 22dbbc6db712a0ec9a8038777bc9c86499887b7e (diff) |
Revert early destruction of RTP sessions
Some code improperly assumes that the sessions are still there, so revert the
change until I can find all of them and fix them.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 31 | ||||
-rw-r--r-- | channels/sip/include/dialog.h | 4 |
2 files changed, 9 insertions, 26 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 05bdc5eb2..750ade278 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3497,23 +3497,6 @@ static int __sip_autodestruct(const void *data) return 0; } -/*! \brief Destroy all RTP instances allocated for a dialog */ -void sip_destroy_rtp(struct sip_pvt *p) -{ - if (p->rtp) { - ast_rtp_instance_destroy(p->rtp); - p->rtp = NULL; - } - if (p->vrtp) { - ast_rtp_instance_destroy(p->vrtp); - p->vrtp = NULL; - } - if (p->trtp) { - ast_rtp_instance_destroy(p->trtp); - p->trtp = NULL; - } -} - /*! \brief Schedule final destruction of SIP dialog. This can not be canceled. * This function is used to keep a dialog around for a period of time in order * to properly respond to any retransmits. */ @@ -3527,8 +3510,6 @@ void sip_scheddestroy_final(struct sip_pvt *p, int ms) if (p->autokillid != -1) { p->final_destruction_scheduled = 1; } - - sip_destroy_rtp(p); } /*! \brief Schedule destruction of SIP dialog */ @@ -5195,9 +5176,15 @@ void __sip_destroy(struct sip_pvt *p, int lockowner, int lockdialoglist) ast_free(p->notify->content); ast_free(p->notify); } - - sip_destroy_rtp(p); - + if (p->rtp) { + ast_rtp_instance_destroy(p->rtp); + } + if (p->vrtp) { + ast_rtp_instance_destroy(p->vrtp); + } + if (p->trtp) { + ast_rtp_instance_destroy(p->trtp); + } if (p->udptl) ast_udptl_destroy(p->udptl); if (p->refer) diff --git a/channels/sip/include/dialog.h b/channels/sip/include/dialog.h index 08dd6d3f0..ed31b7774 100644 --- a/channels/sip/include/dialog.h +++ b/channels/sip/include/dialog.h @@ -40,10 +40,6 @@ void sip_scheddestroy_final(struct sip_pvt *p, int ms); void sip_scheddestroy(struct sip_pvt *p, int ms); int sip_cancel_destroy(struct sip_pvt *p); -/*! \brief Destroy the RTP instances associated with a dialog - */ -void sip_destroy_rtp(struct sip_pvt *p); - /*! \brief Destroy SIP call structure. * Make it return NULL so the caller can do things like * foo = sip_destroy(foo); |