diff options
author | Richard Mudgett <rmudgett@digium.com> | 2012-12-11 21:22:45 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2012-12-11 21:22:45 +0000 |
commit | b059bd4c288f8765835b4caa3eeec2912d8b3a9b (patch) | |
tree | 32690da27b46936c0effc95140c20ebc46c0e73a /main | |
parent | 8cb156bfc1533fa7442f9824b00b15c09ad62d19 (diff) |
Cleanup udptl on exit.
* Cleanup CLI commands on exit.
(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
udptl-shutdown-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
udptl-shutdown-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
Modified
........
Merged revisions 377847 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 377848 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377849 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/udptl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/main/udptl.c b/main/udptl.c index 4e48ac80e..bc96790fd 100644 --- a/main/udptl.c +++ b/main/udptl.c @@ -1471,9 +1471,13 @@ int ast_udptl_reload(void) return 0; } -/*! \internal \brief Clean up resources on Asterisk shutdown */ +/*! + * \internal + * \brief Clean up resources on Asterisk shutdown + */ static void udptl_shutdown(void) { + ast_cli_unregister_multiple(cli_udptl, ARRAY_LEN(cli_udptl)); ao2_t_global_obj_release(globals, "Unref udptl global container in shutdown"); aco_info_destroy(&cfg_info); } @@ -1509,9 +1513,9 @@ void ast_udptl_init(void) aco_option_register_custom(&cfg_info, "t38faxudpec", ACO_EXACT, general_options, NULL, removed_options_handler, 0); aco_option_register_custom(&cfg_info, "t38faxmaxdatagram", ACO_EXACT, general_options, NULL, removed_options_handler, 0); - ast_cli_register_multiple(cli_udptl, ARRAY_LEN(cli_udptl)); - __ast_udptl_reload(0); + ast_cli_register_multiple(cli_udptl, ARRAY_LEN(cli_udptl)); + ast_register_atexit(udptl_shutdown); } |