From 96a646734fe34d65077cbe49c533b80759fc12e8 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 16 Jul 2007 13:35:20 +0000 Subject: [PATCH] It is no longer required for each module that deals with a channel to call ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75183 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_adsiprog.c | 9 +-------- apps/app_alarmreceiver.c | 8 +------- apps/app_amd.c | 1 - apps/app_authenticate.c | 9 +-------- apps/app_cdr.c | 8 +------- apps/app_chanisavail.c | 8 +------- apps/app_channelredirect.c | 8 +------- apps/app_chanspy.c | 2 -- apps/app_dial.c | 2 -- apps/app_disa.c | 8 +------- apps/app_dumpchan.c | 8 +------- apps/app_echo.c | 8 +------- apps/app_exec.c | 2 -- apps/app_externalivr.c | 8 +------- apps/app_festival.c | 8 +------- apps/app_flash.c | 8 +------- apps/app_followme.c | 2 -- apps/app_forkcdr.c | 8 +------- apps/app_getcpeid.c | 8 +------- apps/app_ices.c | 8 +------- apps/app_image.c | 8 +------- apps/app_ivrdemo.c | 8 +------- apps/app_macro.c | 2 -- apps/app_meetme.c | 2 -- apps/app_milliwatt.c | 8 +------- apps/app_minivm.c | 3 --- apps/app_mixmonitor.c | 2 -- apps/app_morsecode.c | 8 +------- apps/app_mp3.c | 8 +------- apps/app_nbscat.c | 8 +------- apps/app_osplookup.c | 2 -- apps/app_page.c | 8 +------- apps/app_parkandannounce.c | 8 +------- apps/app_playback.c | 2 -- apps/app_privacy.c | 10 ++-------- apps/app_queue.c | 2 -- apps/app_read.c | 8 +------- apps/app_readfile.c | 8 +------- apps/app_record.c | 8 +------- apps/app_rpt.c | 1 - apps/app_sayunixtime.c | 2 -- apps/app_senddtmf.c | 2 -- apps/app_sendtext.c | 8 +------- apps/app_setcallerid.c | 4 +--- apps/app_sms.c | 8 +------- apps/app_softhangup.c | 8 +------- apps/app_speech_utils.c | 2 -- apps/app_stack.c | 2 -- apps/app_system.c | 2 -- apps/app_talkdetect.c | 8 +------- apps/app_test.c | 2 -- apps/app_transfer.c | 8 +------- apps/app_url.c | 8 +------- apps/app_userevent.c | 8 +------- apps/app_verbose.c | 2 -- apps/app_voicemail.c | 2 -- apps/app_waitforring.c | 8 +------- apps/app_waitforsilence.c | 8 +------- apps/app_while.c | 2 -- apps/app_zapateller.c | 8 +------- apps/app_zapbarge.c | 8 +------- apps/app_zapras.c | 8 +------- apps/app_zapscan.c | 8 +------- funcs/func_blacklist.c | 4 +--- funcs/func_curl.c | 2 -- funcs/func_cut.c | 2 -- funcs/func_enum.c | 2 -- funcs/func_realtime.c | 10 ++-------- funcs/func_vmcount.c | 5 +---- res/res_agi.c | 1 - res/res_config_odbc.c | 1 - res/res_config_pgsql.c | 2 -- res/res_features.c | 2 -- res/res_realtime.c | 1 - 74 files changed, 46 insertions(+), 357 deletions(-) diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c index b07a950a26..4729bcd99d 100644 --- a/apps/app_adsiprog.c +++ b/apps/app_adsiprog.c @@ -1572,14 +1572,7 @@ static int adsi_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - ast_module_user_hangup_all(); - - res = ast_unregister_application(app); - - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c index f74abb8a64..0b695eb162 100644 --- a/apps/app_alarmreceiver.c +++ b/apps/app_alarmreceiver.c @@ -823,13 +823,7 @@ static int load_config(void) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_amd.c b/apps/app_amd.c index 59bc5ab8a7..6c753783d8 100644 --- a/apps/app_amd.c +++ b/apps/app_amd.c @@ -383,7 +383,6 @@ static void load_config(void) static int unload_module(void) { - ast_module_user_hangup_all(); return ast_unregister_application(app); } diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c index be9cba8bf6..4cd85ce4f2 100644 --- a/apps/app_authenticate.c +++ b/apps/app_authenticate.c @@ -223,14 +223,7 @@ static int auth_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - ast_module_user_hangup_all(); - - res = ast_unregister_application(app); - - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_cdr.c b/apps/app_cdr.c index c0d88fbbbc..23044de80e 100644 --- a/apps/app_cdr.c +++ b/apps/app_cdr.c @@ -61,13 +61,7 @@ static int nocdr_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(nocdr_app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(nocdr_app); } static int load_module(void) diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c index 13b9197bb9..dbcc9b4d99 100644 --- a/apps/app_chanisavail.c +++ b/apps/app_chanisavail.c @@ -157,13 +157,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res = 0; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_channelredirect.c b/apps/app_channelredirect.c index bba90b9390..a67918aad0 100644 --- a/apps/app_channelredirect.c +++ b/apps/app_channelredirect.c @@ -122,13 +122,7 @@ static int asyncgoto_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 03a6322f89..fc3f4b920e 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -799,8 +799,6 @@ static int unload_module(void) res |= ast_unregister_application(app_chan); res |= ast_unregister_application(app_ext); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_dial.c b/apps/app_dial.c index 8751d65ea4..7ee3e3272a 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1946,8 +1946,6 @@ static int unload_module(void) res = ast_unregister_application(app); res |= ast_unregister_application(rapp); - ast_module_user_hangup_all(); - if ((con = ast_context_find("app_dial_gosub_virtual_context"))) { ast_context_remove_extension2(con, "s", 1, NULL); } diff --git a/apps/app_disa.c b/apps/app_disa.c index 137fee3d0c..99d4f97eba 100644 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -388,13 +388,7 @@ reorder: static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c index 8fca2b64ac..29ad21a592 100644 --- a/apps/app_dumpchan.c +++ b/apps/app_dumpchan.c @@ -165,13 +165,7 @@ static int dumpchan_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_echo.c b/apps/app_echo.c index 14f7c6d650..6110f53694 100644 --- a/apps/app_echo.c +++ b/apps/app_echo.c @@ -87,13 +87,7 @@ end: static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_exec.c b/apps/app_exec.c index 507045cc32..32298d03cb 100644 --- a/apps/app_exec.c +++ b/apps/app_exec.c @@ -207,8 +207,6 @@ static int unload_module(void) res |= ast_unregister_application(app_tryexec); res |= ast_unregister_application(app_execif); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c index f08e42ac29..e5778edba5 100644 --- a/apps/app_externalivr.c +++ b/apps/app_externalivr.c @@ -578,13 +578,7 @@ static int app_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_festival.c b/apps/app_festival.c index 6a8a26f541..d43c3aa16e 100644 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -536,13 +536,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_flash.c b/apps/app_flash.c index 5f90093bb0..2497419a26 100644 --- a/apps/app_flash.c +++ b/apps/app_flash.c @@ -111,13 +111,7 @@ static int flash_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_followme.c b/apps/app_followme.c index 3e9c90aa42..a97f402129 100644 --- a/apps/app_followme.c +++ b/apps/app_followme.c @@ -1052,8 +1052,6 @@ static int unload_module(void) { struct call_followme *f; - ast_module_user_hangup_all(); - ast_unregister_application(app); /* Free Memory. Yeah! I'm free! */ diff --git a/apps/app_forkcdr.c b/apps/app_forkcdr.c index d9c5b293f4..a58ca9a83b 100644 --- a/apps/app_forkcdr.c +++ b/apps/app_forkcdr.c @@ -97,13 +97,7 @@ static int forkcdr_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_getcpeid.c b/apps/app_getcpeid.c index f0c5d1b07a..fd19e4a313 100644 --- a/apps/app_getcpeid.c +++ b/apps/app_getcpeid.c @@ -131,13 +131,7 @@ static int cpeid_exec(struct ast_channel *chan, void *idata) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_ices.c b/apps/app_ices.c index c4bee4c5ff..233ac6b13e 100644 --- a/apps/app_ices.c +++ b/apps/app_ices.c @@ -208,13 +208,7 @@ static int ices_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_image.c b/apps/app_image.c index 6ec8bec712..6f35ea1109 100644 --- a/apps/app_image.c +++ b/apps/app_image.c @@ -99,13 +99,7 @@ static int sendimage_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_ivrdemo.c b/apps/app_ivrdemo.c index 933ae9040f..e28e94d2c4 100644 --- a/apps/app_ivrdemo.c +++ b/apps/app_ivrdemo.c @@ -115,13 +115,7 @@ static int skel_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_macro.c b/apps/app_macro.c index 53a012cdb4..01556d3a76 100644 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -536,8 +536,6 @@ static int unload_module(void) res |= ast_unregister_application(app); res |= ast_unregister_application(exclusive_app); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 5c75e86068..65c8d6c96d 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -4972,8 +4972,6 @@ static int unload_module(void) ast_devstate_prov_del("Meetme"); ast_devstate_prov_del("SLA"); - - ast_module_user_hangup_all(); sla_destroy(); diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c index 31ded36d6d..89ef375451 100644 --- a/apps/app_milliwatt.c +++ b/apps/app_milliwatt.c @@ -140,13 +140,7 @@ static int milliwatt_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_minivm.c b/apps/app_minivm.c index 75bb8dfcb6..f0a2f08bbf 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -3130,9 +3130,6 @@ static int unload_module(void) timezone_destroy_list(); /* Destroy list of timezones */ vmaccounts_destroy_list(); /* Destroy list of voicemail accounts */ - - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index e24f62fdbc..308f82b4d6 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -450,8 +450,6 @@ static int unload_module(void) res = ast_unregister_application(stop_app); res |= ast_unregister_application(app); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_morsecode.c b/apps/app_morsecode.c index cd42112318..61c4fe4bd6 100644 --- a/apps/app_morsecode.c +++ b/apps/app_morsecode.c @@ -161,13 +161,7 @@ static int morsecode_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app_morsecode); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app_morsecode); } static int load_module(void) diff --git a/apps/app_mp3.c b/apps/app_mp3.c index b0539e17b8..2656a6b791 100644 --- a/apps/app_mp3.c +++ b/apps/app_mp3.c @@ -238,13 +238,7 @@ static int mp3_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_nbscat.c b/apps/app_nbscat.c index 6a922ecd20..ca2b61f8bc 100644 --- a/apps/app_nbscat.c +++ b/apps/app_nbscat.c @@ -220,13 +220,7 @@ static int NBScat_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c index dd5116fd53..ce1417ec96 100644 --- a/apps/app_osplookup.c +++ b/apps/app_osplookup.c @@ -2049,8 +2049,6 @@ static int unload_module(void) ast_cli_unregister_multiple(cli_osp, sizeof(cli_osp) / sizeof(struct ast_cli_entry)); osp_unload(); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_page.c b/apps/app_page.c index f6dab7a545..8ee48bd295 100644 --- a/apps/app_page.c +++ b/apps/app_page.c @@ -195,13 +195,7 @@ static int page_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app_page); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app_page); } static int load_module(void) diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c index b4e9006fb3..fe63da9e1a 100644 --- a/apps/app_parkandannounce.c +++ b/apps/app_parkandannounce.c @@ -242,13 +242,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_playback.c b/apps/app_playback.c index a476dd92c6..345f07ecea 100644 --- a/apps/app_playback.c +++ b/apps/app_playback.c @@ -462,8 +462,6 @@ static int unload_module(void) ast_cli_unregister_multiple(cli_playback, sizeof(cli_playback) / sizeof(struct ast_cli_entry)); - ast_module_user_hangup_all(); - if (say_cfg) ast_config_destroy(say_cfg); diff --git a/apps/app_privacy.c b/apps/app_privacy.c index 4a61b3189b..000c9ef2ae 100644 --- a/apps/app_privacy.c +++ b/apps/app_privacy.c @@ -206,18 +206,12 @@ static int privacy_exec (struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application (app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application (app); } static int load_module(void) { - return ast_register_application (app, privacy_exec, synopsis, descrip); + return ast_register_application(app, privacy_exec, synopsis, descrip); } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Require phone number to be entered, if no CallerID sent"); diff --git a/apps/app_queue.c b/apps/app_queue.c index 21f91455cf..1d30086da6 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -4784,8 +4784,6 @@ static int unload_module(void) ast_context_remove_extension2(con, "s", 1, NULL); } - ast_module_user_hangup_all(); - clear_and_free_interfaces(); return res; diff --git a/apps/app_read.c b/apps/app_read.c index cde03c6375..b2354bb33c 100644 --- a/apps/app_read.c +++ b/apps/app_read.c @@ -218,13 +218,7 @@ static int read_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_readfile.c b/apps/app_readfile.c index 62221570c5..be25aac920 100644 --- a/apps/app_readfile.c +++ b/apps/app_readfile.c @@ -103,13 +103,7 @@ static int readfile_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app_readfile); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app_readfile); } static int load_module(void) diff --git a/apps/app_record.c b/apps/app_record.c index b5e85a616d..8475791e38 100644 --- a/apps/app_record.c +++ b/apps/app_record.c @@ -375,13 +375,7 @@ static int record_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_rpt.c b/apps/app_rpt.c index cc979f6d39..d67b5eef34 100644 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -7437,7 +7437,6 @@ static int unload_module(void) { int i; - ast_module_user_hangup_all(); for (i = 0; i < nrpts; i++) { if (!strcmp(rpt_vars[i].name, rpt_vars[i].p.nodes)) continue; diff --git a/apps/app_sayunixtime.c b/apps/app_sayunixtime.c index 2e9c9b3235..0cb2406aee 100644 --- a/apps/app_sayunixtime.c +++ b/apps/app_sayunixtime.c @@ -107,8 +107,6 @@ static int unload_module(void) res = ast_unregister_application(app_sayunixtime); res |= ast_unregister_application(app_datetime); - - ast_module_user_hangup_all(); return res; } diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c index e48ba4fe06..987fac2f95 100644 --- a/apps/app_senddtmf.c +++ b/apps/app_senddtmf.c @@ -125,8 +125,6 @@ static int unload_module(void) res = ast_unregister_application(app); res |= ast_manager_unregister("PlayDTMF"); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c index f9bbc9918e..bb3ca180de 100644 --- a/apps/app_sendtext.c +++ b/apps/app_sendtext.c @@ -104,13 +104,7 @@ static int sendtext_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_setcallerid.c b/apps/app_setcallerid.c index 59b4d9af8c..daf97c7280 100644 --- a/apps/app_setcallerid.c +++ b/apps/app_setcallerid.c @@ -92,9 +92,7 @@ static int setcallerid_pres_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res = ast_unregister_application(app2); - ast_module_user_hangup_all(); - return res; + return ast_unregister_application(app2); } static int load_module(void) diff --git a/apps/app_sms.c b/apps/app_sms.c index a6fb5abfca..710ba82c56 100644 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -1929,13 +1929,7 @@ done: static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_softhangup.c b/apps/app_softhangup.c index 018edc07d7..a011c32253 100644 --- a/apps/app_softhangup.c +++ b/apps/app_softhangup.c @@ -104,13 +104,7 @@ static int softhangup_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index 30d1737f3c..b8dd634fdd 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -823,8 +823,6 @@ static int unload_module(void) res |= ast_custom_function_unregister(&speech_engine_function); res |= ast_custom_function_unregister(&speech_results_type_function); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_stack.c b/apps/app_stack.c index d54dd2a596..4e4d78aec1 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -421,8 +421,6 @@ static int unload_module(void) ast_unregister_application(app_gosub); ast_custom_function_unregister(&local_function); - ast_module_user_hangup_all(); - return 0; } diff --git a/apps/app_system.c b/apps/app_system.c index 382133bfe8..57870de3c3 100644 --- a/apps/app_system.c +++ b/apps/app_system.c @@ -123,8 +123,6 @@ static int unload_module(void) res = ast_unregister_application(app); res |= ast_unregister_application(app2); - - ast_module_user_hangup_all(); return res; } diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c index b261d402f7..6cd8572bb3 100644 --- a/apps/app_talkdetect.c +++ b/apps/app_talkdetect.c @@ -211,13 +211,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_test.c b/apps/app_test.c index 7941351567..4ffd6a7ad7 100644 --- a/apps/app_test.c +++ b/apps/app_test.c @@ -465,8 +465,6 @@ static int unload_module(void) res = ast_unregister_application(testc_app); res |= ast_unregister_application(tests_app); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_transfer.c b/apps/app_transfer.c index 4d918f67b4..76655cedeb 100644 --- a/apps/app_transfer.c +++ b/apps/app_transfer.c @@ -131,13 +131,7 @@ static int transfer_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_url.c b/apps/app_url.c index 96787a9671..f24d5492ad 100644 --- a/apps/app_url.c +++ b/apps/app_url.c @@ -145,13 +145,7 @@ out: static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_userevent.c b/apps/app_userevent.c index df7bc58a79..64c0d9ae93 100644 --- a/apps/app_userevent.c +++ b/apps/app_userevent.c @@ -92,13 +92,7 @@ static int userevent_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_verbose.c b/apps/app_verbose.c index f9bcfd1161..c94ba290eb 100644 --- a/apps/app_verbose.c +++ b/apps/app_verbose.c @@ -150,8 +150,6 @@ static int unload_module(void) res = ast_unregister_application(app_verbose); res |= ast_unregister_application(app_log); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 54d312b043..1277cc3174 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -8501,8 +8501,6 @@ static int unload_module(void) res |= ast_manager_unregister("VoicemailUsersList"); ast_cli_unregister_multiple(cli_voicemail, sizeof(cli_voicemail) / sizeof(struct ast_cli_entry)); ast_uninstall_vm_functions(); - - ast_module_user_hangup_all(); if (poll_thread != AST_PTHREADT_NULL) stop_poll_thread(); diff --git a/apps/app_waitforring.c b/apps/app_waitforring.c index d59644baca..50d96f52ff 100644 --- a/apps/app_waitforring.c +++ b/apps/app_waitforring.c @@ -120,13 +120,7 @@ static int waitforring_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_waitforsilence.c b/apps/app_waitforsilence.c index c74bfd960d..a6a7650c6f 100644 --- a/apps/app_waitforsilence.c +++ b/apps/app_waitforsilence.c @@ -187,13 +187,7 @@ static int waitforsilence_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_while.c b/apps/app_while.c index ddc581ed96..3733d3bdc7 100644 --- a/apps/app_while.c +++ b/apps/app_while.c @@ -315,8 +315,6 @@ static int unload_module(void) res |= ast_unregister_application(exit_app); res |= ast_unregister_application(continue_app); - ast_module_user_hangup_all(); - return res; } diff --git a/apps/app_zapateller.c b/apps/app_zapateller.c index 7355670b61..283556a9e7 100644 --- a/apps/app_zapateller.c +++ b/apps/app_zapateller.c @@ -105,13 +105,7 @@ static int zapateller_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_zapbarge.c b/apps/app_zapbarge.c index 201ae78de0..c8b86559c4 100644 --- a/apps/app_zapbarge.c +++ b/apps/app_zapbarge.c @@ -300,13 +300,7 @@ out: static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_zapras.c b/apps/app_zapras.c index 6191327b2f..2aa0a30eff 100644 --- a/apps/app_zapras.c +++ b/apps/app_zapras.c @@ -241,13 +241,7 @@ static int zapras_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/apps/app_zapscan.c b/apps/app_zapscan.c index 17d84a6a03..e95f7f5577 100644 --- a/apps/app_zapscan.c +++ b/apps/app_zapscan.c @@ -363,13 +363,7 @@ static int conf_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - - res = ast_unregister_application(app); - - ast_module_user_hangup_all(); - - return res; + return ast_unregister_application(app); } static int load_module(void) diff --git a/funcs/func_blacklist.c b/funcs/func_blacklist.c index d3f829d108..30e916d59f 100644 --- a/funcs/func_blacklist.c +++ b/funcs/func_blacklist.c @@ -75,9 +75,7 @@ static struct ast_custom_function blacklist_function = { static int unload_module(void) { - int res = ast_custom_function_unregister(&blacklist_function); - ast_module_user_hangup_all(); - return res; + return ast_custom_function_unregister(&blacklist_function); } static int load_module(void) diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 38c63196c6..802bbb4a07 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -187,8 +187,6 @@ static int unload_module(void) res = ast_custom_function_unregister(&acf_curl); - ast_module_user_hangup_all(); - curl_global_cleanup(); return res; diff --git a/funcs/func_cut.c b/funcs/func_cut.c index 9cab185b2d..7afd978cab 100644 --- a/funcs/func_cut.c +++ b/funcs/func_cut.c @@ -306,8 +306,6 @@ static int unload_module(void) res |= ast_custom_function_unregister(&acf_cut); res |= ast_custom_function_unregister(&acf_sort); - ast_module_user_hangup_all(); - return res; } diff --git a/funcs/func_enum.c b/funcs/func_enum.c index 6e5e0c0d4a..ff7ab4f213 100644 --- a/funcs/func_enum.c +++ b/funcs/func_enum.c @@ -392,8 +392,6 @@ static int unload_module(void) res |= ast_custom_function_unregister(&enum_function); res |= ast_custom_function_unregister(&txtcidname_function); - ast_module_user_hangup_all(); - return res; } diff --git a/funcs/func_realtime.c b/funcs/func_realtime.c index 47d51bf647..7ffe8122cb 100644 --- a/funcs/func_realtime.c +++ b/funcs/func_realtime.c @@ -148,18 +148,12 @@ struct ast_custom_function realtime_function = { static int unload_module(void) { - int res = ast_custom_function_unregister(&realtime_function); - - ast_module_user_hangup_all(); - - return res; + return ast_custom_function_unregister(&realtime_function); } static int load_module(void) { - int res = ast_custom_function_register(&realtime_function); - - return res; + return ast_custom_function_register(&realtime_function); } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Read/Write values from a RealTime repository"); diff --git a/funcs/func_vmcount.c b/funcs/func_vmcount.c index 3cb5029e56..7f0282c323 100644 --- a/funcs/func_vmcount.c +++ b/funcs/func_vmcount.c @@ -90,10 +90,7 @@ struct ast_custom_function acf_vmcount = { static int unload_module(void) { - int res = ast_custom_function_unregister(&acf_vmcount); - ast_module_user_hangup_all(); - - return res; + return ast_custom_function_unregister(&acf_vmcount); } static int load_module(void) diff --git a/res/res_agi.c b/res/res_agi.c index 72683e6910..a69239936a 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -2138,7 +2138,6 @@ static struct ast_cli_entry cli_agi[] = { static int unload_module(void) { - ast_module_user_hangup_all(); ast_cli_unregister_multiple(cli_agi, sizeof(cli_agi) / sizeof(struct ast_cli_entry)); ast_unregister_application(eapp); ast_unregister_application(deadapp); diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c index 158b40f67f..28c8c316e0 100644 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -575,7 +575,6 @@ static struct ast_config_engine odbc_engine = { static int unload_module (void) { - ast_module_user_hangup_all(); ast_config_engine_deregister(&odbc_engine); if (option_verbose) ast_verbose("res_config_odbc unloaded.\n"); diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index e8993dd867..4b9c1898f4 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -573,8 +573,6 @@ static int unload_module(void) ast_verbose("Postgresql RealTime unloaded.\n"); } - ast_module_user_hangup_all(); - /* Unlock so something else can destroy the lock. */ ast_mutex_unlock(&pgsql_lock); diff --git a/res/res_features.c b/res/res_features.c index 3e31df24f1..3f71bfadfe 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -3051,8 +3051,6 @@ static int load_module(void) static int unload_module(void) { - ast_module_user_hangup_all(); - ast_manager_unregister("ParkedCalls"); ast_manager_unregister("Bridge"); ast_manager_unregister("Park"); diff --git a/res/res_realtime.c b/res/res_realtime.c index 28525f4487..3981e74f14 100644 --- a/res/res_realtime.c +++ b/res/res_realtime.c @@ -114,7 +114,6 @@ static struct ast_cli_entry cli_realtime[] = { static int unload_module(void) { ast_cli_unregister_multiple(cli_realtime, sizeof(cli_realtime) / sizeof(struct ast_cli_entry)); - ast_module_user_hangup_all(); return 0; } -- 2.47.2