Skip to content
Snippets Groups Projects
Commit c81da532 authored by Terry Wilson's avatar Terry Wilson
Browse files

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!
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 8be13e12
No related branches found
No related tags found
No related merge requests found
...@@ -382,6 +382,7 @@ static int ast_srtp_create(struct ast_srtp **srtp, struct ast_rtp_instance *rtp, ...@@ -382,6 +382,7 @@ static int ast_srtp_create(struct ast_srtp **srtp, struct ast_rtp_instance *rtp,
return -1; return -1;
} }
ast_module_ref(ast_module_info->self);
temp->rtp = rtp; temp->rtp = rtp;
*srtp = temp; *srtp = temp;
...@@ -400,6 +401,7 @@ static void ast_srtp_destroy(struct ast_srtp *srtp) ...@@ -400,6 +401,7 @@ static void ast_srtp_destroy(struct ast_srtp *srtp)
ao2_t_ref(srtp->policies, -1, "Destroying container"); ao2_t_ref(srtp->policies, -1, "Destroying container");
ast_free(srtp); 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) static int ast_srtp_add_stream(struct ast_srtp *srtp, struct ast_srtp_policy *policy)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment