[asterisk-commits] russell: trunk r204422 - in /trunk: addons/ configs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 30 12:15:12 CDT 2009


Author: russell
Date: Tue Jun 30 12:15:09 2009
New Revision: 204422

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=204422
Log:
Rename res_mysql.conf to res_config_mysql.conf, make module support both

Added:
    trunk/configs/res_config_mysql.conf.sample
      - copied unchanged from r204421, trunk/configs/res_mysql.conf.sample
Removed:
    trunk/configs/res_mysql.conf.sample
Modified:
    trunk/addons/res_config_mysql.c

Modified: trunk/addons/res_config_mysql.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/addons/res_config_mysql.c?view=diff&rev=204422&r1=204421&r2=204422
==============================================================================
--- trunk/addons/res_config_mysql.c (original)
+++ trunk/addons/res_config_mysql.c Tue Jun 30 12:15:09 2009
@@ -47,7 +47,8 @@
 #include "asterisk/utils.h"
 #include "asterisk/threadstorage.h"
 
-#define RES_CONFIG_MYSQL_CONF "res_mysql.conf"
+#define RES_CONFIG_MYSQL_CONF "res_config_mysql.conf"
+#define RES_CONFIG_MYSQL_CONF_OLD "res_mysql.conf"
 #define	READHANDLE	0
 #define	WRITEHANDLE	1
 
@@ -1413,6 +1414,11 @@
 	struct mysql_conn *cur;
 
 	if ((config = ast_config_load(RES_CONFIG_MYSQL_CONF, config_flags)) == CONFIG_STATUS_FILEMISSING) {
+		/* Support old config file name */
+		config = ast_config_load(RES_CONFIG_MYSQL_CONF_OLD, config_flags);
+	}
+
+	if (config == CONFIG_STATUS_FILEMISSING) {
 		return 0;
 	} else if (config == CONFIG_STATUS_FILEUNCHANGED) {
 		return 0;




More information about the asterisk-commits mailing list