diff options
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r-- | channels/chan_skinny.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 03da0e0d8..08629fd78 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -2198,8 +2198,7 @@ static void cleanup_stale_contexts(char *new, char *old) } } - if (stalecontext) - ast_context_destroy(ast_context_find(stalecontext), "Skinny"); + ast_context_destroy_by_name(stalecontext, "Skinny"); } } @@ -8717,7 +8716,6 @@ static int unload_module(void) struct skinny_device *d; struct skinny_line *l; struct skinny_subchannel *sub; - struct ast_context *con; pthread_t tempthread; ast_rtp_glue_unregister(&skinny_rtp_glue); @@ -8778,9 +8776,7 @@ static int unload_module(void) ast_sched_context_destroy(sched); } - con = ast_context_find(used_context); - if (con) - ast_context_destroy(con, "Skinny"); + ast_context_destroy_by_name(used_context, "Skinny"); ao2_ref(default_cap, -1); return 0; |