[asterisk-commits] rmudgett: branch 10 r377848 - in /branches/10: ./ main/udptl.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 11 15:07:50 CST 2012


Author: rmudgett
Date: Tue Dec 11 15:07:47 2012
New Revision: 377848

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377848
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
........

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

Modified:
    branches/10/   (props changed)
    branches/10/main/udptl.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/udptl.c?view=diff&rev=377848&r1=377847&r2=377848
==============================================================================
--- branches/10/main/udptl.c (original)
+++ branches/10/main/udptl.c Tue Dec 11 15:07:47 2012
@@ -1421,8 +1421,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