Cleanup udptl on exit.

* Cleanup CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      udptl-shutdown-1_8-10.patch (license ) patch uploaded by Corey Farrell
      udptl-shutdown-11-trunk.patch (license ) patch uploaded by Corey Farrell
      Modified
........

Merged revisions 377847 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@377848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
10
Richard Mudgett 13 years ago
parent 38253a70d2
commit e17a83acf6

@ -1421,8 +1421,20 @@ int ast_udptl_reload(void)
return 0;
}
/*!
* \internal
* \brief Clean up resources on Asterisk shutdown
*/
static void udptl_shutdown(void)
{
ast_cli_unregister_multiple(cli_udptl, ARRAY_LEN(cli_udptl));
}
void ast_udptl_init(void)
{
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);
}

Loading…
Cancel
Save