[asterisk-commits] twilson: branch 1.8 r292016 - /branches/1.8/res/res_srtp.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Oct 15 16:40:59 CDT 2010
Author: twilson
Date: Fri Oct 15 16:40:56 2010
New Revision: 292016
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=292016
Log:
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:
branches/1.8/res/res_srtp.c
Modified: branches/1.8/res/res_srtp.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_srtp.c?view=diff&rev=292016&r1=292015&r2=292016
==============================================================================
--- branches/1.8/res/res_srtp.c (original)
+++ branches/1.8/res/res_srtp.c Fri Oct 15 16:40:56 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