[asterisk-commits] trunk r26529 - /trunk/apps/app_playback.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 10 08:38:55 MST 2006


Author: rizzo
Date: Wed May 10 10:38:54 2006
New Revision: 26529

URL: http://svn.digium.com/view/asterisk?rev=26529&view=rev
Log:
support reload say.conf to ease testing


Modified:
    trunk/apps/app_playback.c

Modified: trunk/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_playback.c?rev=26529&r1=26528&r2=26529&view=diff
==============================================================================
--- trunk/apps/app_playback.c (original)
+++ trunk/apps/app_playback.c Wed May 10 10:38:54 2006
@@ -451,6 +451,16 @@
 	return res;
 }
 
+static int reload(void *mod)
+{
+	if (say_cfg) {
+		ast_config_destroy(say_cfg);
+		ast_log(LOG_NOTICE, "Reloading say.conf\n");
+	}
+	say_cfg = ast_config_load("say.conf");
+	return 0;
+}
+
 static int unload_module(void *mod)
 {
 	int res;
@@ -464,6 +474,7 @@
 
 static int load_module(void *mod)
 {
+	reload(mod);
         ast_cli_register_multiple(myclis, sizeof(myclis)/sizeof(struct ast_cli_entry));
 	return ast_register_application(app, playback_exec, synopsis, descrip);
 }
@@ -478,4 +489,4 @@
 	return ASTERISK_GPL_KEY;
 }
 
-STD_MOD1;
+STD_MOD(MOD_1,reload,NULL,NULL);



More information about the asterisk-commits mailing list