mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-11 23:28:59 +00:00
Rename res_mysql.conf to res_config_mysql.conf, make module support both
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -47,7 +47,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#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 @@ static int parse_config(int reload)
|
||||
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;
|
||||
|
Reference in New Issue
Block a user