[asterisk-commits] twilson: trunk r292017 - in /trunk: ./ res/res_srtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 15 16:49:53 CDT 2010


Author: twilson
Date: Fri Oct 15 16:49:49 2010
New Revision: 292017

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=292017
Log:
Merged revisions 292016 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292016 | twilson | 2010-10-15 16:40:56 -0500 (Fri, 15 Oct 2010) | 5 lines
  
  Ref/unref res_srtp when we create/destroy a session
  
  This avoids unhappy crashing when we try to 'core stop gracefully' and res_srtp
  tries to unload before chan_sip does. Thanks, Russell!
........

Modified:
    trunk/   (props changed)
    trunk/res/res_srtp.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/res/res_srtp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_srtp.c?view=diff&rev=292017&r1=292016&r2=292017
==============================================================================
--- trunk/res/res_srtp.c (original)
+++ trunk/res/res_srtp.c Fri Oct 15 16:49:49 2010
@@ -382,6 +382,7 @@
 		return -1;
 	}
 
+	ast_module_ref(ast_module_info->self);
 	temp->rtp = rtp;
 	*srtp = temp;
 
@@ -400,6 +401,7 @@
 	ao2_t_ref(srtp->policies, -1, "Destroying container");
 
 	ast_free(srtp);
+	ast_module_unref(ast_module_info->self);
 }
 
 static int ast_srtp_add_stream(struct ast_srtp *srtp, struct ast_srtp_policy *policy)




More information about the asterisk-commits mailing list