]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Reload must react correctly against a possibly changed table, so dropping the conditi...
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 1 Apr 2011 10:44:33 +0000 (10:44 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 1 Apr 2011 10:44:33 +0000 (10:44 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@312286 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/cdr_mysql.c

index 504163a21f64cf75a4fd138dfb597a5c72538cd3..167a5af58d046bb948fd4666aff571bebe1e129e 100644 (file)
@@ -428,7 +428,7 @@ static int my_load_module(int reload)
        int res;
        struct ast_config *cfg;
        struct ast_variable *var;
-       struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
+       struct ast_flags config_flags = { 0 };
        struct column *entry;
        char *temp;
        struct ast_str *compat;
@@ -439,6 +439,9 @@ static int my_load_module(int reload)
        my_bool my_bool_true = 1;
 #endif
 
+       /* Cannot use a conditionally different flag, because the table layout may
+        * have changed, which is not detectable by config file change detection,
+        * but should still cause the configuration to be re-parsed. */
        cfg = ast_config_load(config, config_flags);
        if (!cfg) {
                ast_log(LOG_WARNING, "Unable to load config for mysql CDR's: %s\n", config);