From: Paul Belanger Date: Mon, 29 Nov 2010 22:49:39 +0000 (+0000) Subject: Make sure nothing else is needed before destroying the scheduler. X-Git-Tag: 1.4.39-rc1~3^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=728bb5ac672817b6c584700ef88d0b00b1e1a0ef;p=thirdparty%2Fasterisk.git Make sure nothing else is needed before destroying the scheduler. (closes issue #18398) Reported by: pabelanger git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@296670 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 5e9de02e8b..d55e8f7800 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -12610,7 +12610,6 @@ static int __unload_module(void) ast_channel_unregister(&iax2_tech); delete_users(); iax_provision_unload(); - sched_context_destroy(sched); reload_firmware(1); ast_mutex_destroy(&waresl.lock); @@ -12622,12 +12621,13 @@ static int __unload_module(void) ao2_ref(peers, -1); ao2_ref(users, -1); ao2_ref(iax_peercallno_pvts, -1); - ao2_ref(iax_transfercallno_pvts, -1); + ao2_ref(iax_transfercallno_pvts, -1); ao2_ref(peercnts, -1); ao2_ref(callno_limits, -1); ao2_ref(calltoken_ignores, -1); ao2_ref(callno_pool, -1); ao2_ref(callno_pool_trunk, -1); + sched_context_destroy(sched); return 0; }