aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_odbc.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-16 21:09:46 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-16 21:09:46 +0000
commitdbec3d56c146801fad339a1d46a388865b18ffb4 (patch)
tree8fda811f62cb6ffb99847befb7b74b1519ea95ba /res/res_odbc.c
parent0fb9c73a989207650aa3ba603824e4593809611b (diff)
Don't reload a configuration file if nothing has changed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_odbc.c')
-rw-r--r--res/res_odbc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 6b70f16f6..c9d3ee700 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -213,10 +213,11 @@ static int load_odbc_config(void)
char *cat, *dsn, *username, *password, *sanitysql;
int enabled, pooling, limit;
int connect = 0, res = 0;
+ struct ast_flags config_flags = { 0 };
struct odbc_class *new;
- config = ast_config_load(cfg);
+ config = ast_config_load(cfg, config_flags);
if (!config) {
ast_log(LOG_WARNING, "Unable to load config file res_odbc.conf\n");
return -1;
@@ -538,6 +539,7 @@ static int reload(void)
char *cat, *dsn, *username, *password, *sanitysql;
int enabled, pooling, limit;
int connect = 0, res = 0;
+ struct ast_flags config_flags = { CONFIG_FLAG_FILEUNCHANGED };
struct odbc_class *new, *class;
struct odbc_obj *current;
@@ -548,8 +550,8 @@ static int reload(void)
class->delme = 1;
}
- config = ast_config_load(cfg);
- if (config) {
+ config = ast_config_load(cfg, config_flags);
+ if (config != NULL && config != CONFIG_STATUS_FILEUNCHANGED) {
for (cat = ast_category_browse(config, NULL); cat; cat=ast_category_browse(config, cat)) {
if (!strcasecmp(cat, "ENV")) {
for (v = ast_variable_browse(config, cat); v; v = v->next) {