[asterisk-commits] sgriepentrog: branch 12 r418369 - in /branches/12: ./ main/config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 11 11:40:57 CDT 2014


Author: sgriepentrog
Date: Fri Jul 11 11:40:54 2014
New Revision: 418369

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418369
Log:
config: inform config hook of change when writing file

When updated configuration is written back to the conf
file - for example when a user changes their voicemail
pin, make sure that any config hook that wants to know
of changes is informed.

Review: https://reviewboard.asterisk.org/r/3708/
........

Merged revisions 418366 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/12/   (props changed)
    branches/12/main/config.c

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/main/config.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/config.c?view=diff&rev=418369&r1=418368&r2=418369
==============================================================================
--- branches/12/main/config.c (original)
+++ branches/12/main/config.c Fri Jul 11 11:40:54 2014
@@ -69,7 +69,7 @@
 static char *extconfig_conf = "extconfig.conf";
 
 static struct ao2_container *cfg_hooks;
-static void config_hook_exec(const char *filename, const char *module, struct ast_config *cfg);
+static void config_hook_exec(const char *filename, const char *module, const struct ast_config *cfg);
 inline struct ast_variable *variable_list_switch(struct ast_variable *l1, struct ast_variable *l2);
 
 /*! \brief Structure to keep comments for rewriting configuration files */
@@ -2407,6 +2407,9 @@
 		}
 	}
 	ao2_ref(fileset, -1); /* this should destroy the hash container */
+
+	/* pass new configuration to any config hooks */
+	config_hook_exec(configfile, generator, cfg);
 
 	return 0;
 }
@@ -3577,7 +3580,7 @@
 	ao2_find(cfg_hooks, &tmp, OBJ_POINTER | OBJ_UNLINK | OBJ_NODATA);
 }
 
-static void config_hook_exec(const char *filename, const char *module, struct ast_config *cfg)
+static void config_hook_exec(const char *filename, const char *module, const struct ast_config *cfg)
 {
 	struct ao2_iterator it;
 	struct cfg_hook *hook;




More information about the asterisk-commits mailing list