[asterisk-commits] res pjsip session: Release media resources on session end qu... (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 1 14:50:55 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6103 )

Change subject: res_pjsip_session: Release media resources on session end quicker.
......................................................................

res_pjsip_session: Release media resources on session end quicker.

A change was made long ago where the session was kept around
until the underlying INVITE session had been destroyed. This
had the side effect of also keeping the underlying media resources
around for this time as well.

This change ensures that when we know the session is ending we
release the media resources immediately.

ASTERISK-27110

Change-Id: I3c6a82fe7d2c50b9dc9197cb12ef22f20d337501
---
M res/res_pjsip_session.c
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Scott Griepentrog: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Joshua Colp: Approved for Submit



diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index d6c5fbc..26c3e8a 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -2552,6 +2552,11 @@
 			iter->session_end(session);
 		}
 	}
+
+	/* Release any media resources. */
+	ao2_cleanup(session->media);
+	session->media = NULL;
+
 	return 0;
 }
 

-- 
To view, visit https://gerrit.asterisk.org/6103
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I3c6a82fe7d2c50b9dc9197cb12ef22f20d337501
Gerrit-Change-Number: 6103
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Scott Griepentrog <sgriepentrog at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170801/6fee12eb/attachment-0001.html>


More information about the asterisk-commits mailing list