[asterisk-commits] qwell: branch 10-digiumphones r378658 - in /branches/10-digiumphones: ./ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 8 13:06:34 CST 2013


Author: qwell
Date: Tue Jan  8 13:06:30 2013
New Revision: 378658

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378658
Log:
Cleanup config cache on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      config-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
........

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

Merged revisions 377105 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    branches/10-digiumphones/   (props changed)
    branches/10-digiumphones/main/config.c

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

Propchange: branches/10-digiumphones/
------------------------------------------------------------------------------
--- branch-10-merged (original)
+++ branch-10-merged Tue Jan  8 13:06:30 2013
@@ -1,1 +1,1 @@
-/branches/10:1-377102
+/branches/10:1-377102,377105

Modified: branches/10-digiumphones/main/config.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/main/config.c?view=diff&rev=378658&r1=378657&r2=378658
==============================================================================
--- branches/10-digiumphones/main/config.c (original)
+++ branches/10-digiumphones/main/config.c Tue Jan  8 13:06:30 2013
@@ -3072,8 +3072,22 @@
 }
 
 
+static void config_shutdown(void)
+{
+	struct cache_file_mtime *cfmtime;
+
+	AST_LIST_LOCK(&cfmtime_head);
+	while ((cfmtime = AST_LIST_REMOVE_HEAD(&cfmtime_head, list))) {
+		ast_free(cfmtime);
+	}
+	AST_LIST_UNLOCK(&cfmtime_head);
+
+	ast_cli_unregister_multiple(cli_config, ARRAY_LEN(cli_config));
+}
+
 int register_config_cli(void)
 {
 	ast_cli_register_multiple(cli_config, ARRAY_LEN(cli_config));
+	ast_register_atexit(config_shutdown);
 	return 0;
 }




More information about the asterisk-commits mailing list