[asterisk-commits] rmudgett: branch 1.8 r377847 - /branches/1.8/main/udptl.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 11 15:05:10 CST 2012
Author: rmudgett
Date: Tue Dec 11 15:05:07 2012
New Revision: 377847
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377847
Log:
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
Modified:
branches/1.8/main/udptl.c
Modified: branches/1.8/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/udptl.c?view=diff&rev=377847&r1=377846&r2=377847
==============================================================================
--- branches/1.8/main/udptl.c (original)
+++ branches/1.8/main/udptl.c Tue Dec 11 15:05:07 2012
@@ -1418,8 +1418,20 @@
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_udptl_reload(0);
+
ast_cli_register_multiple(cli_udptl, ARRAY_LEN(cli_udptl));
- __ast_udptl_reload(0);
-}
+
+ ast_register_atexit(udptl_shutdown);
+}
More information about the asterisk-commits
mailing list