[asterisk-commits] twilson: trunk r276206 - in /trunk/channels: chan_sip.c sip/include/dialog.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 13 16:42:57 CDT 2010


Author: twilson
Date: Tue Jul 13 16:42:42 2010
New Revision: 276206

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=276206
Log:
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.

Modified:
    trunk/channels/chan_sip.c
    trunk/channels/sip/include/dialog.h

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=276206&r1=276205&r2=276206
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jul 13 16:42:42 2010
@@ -3497,23 +3497,6 @@
 	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 @@
 	if (p->autokillid != -1) {
 		p->final_destruction_scheduled = 1;
 	}
-
-	sip_destroy_rtp(p);
 }
 
 /*! \brief Schedule destruction of SIP dialog */
@@ -5195,9 +5176,15 @@
 		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)

Modified: trunk/channels/sip/include/dialog.h
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sip/include/dialog.h?view=diff&rev=276206&r1=276205&r2=276206
==============================================================================
--- trunk/channels/sip/include/dialog.h (original)
+++ trunk/channels/sip/include/dialog.h Tue Jul 13 16:42:42 2010
@@ -40,10 +40,6 @@
 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);




More information about the asterisk-commits mailing list