diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-16 21:09:46 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-16 21:09:46 +0000 |
commit | dbec3d56c146801fad339a1d46a388865b18ffb4 (patch) | |
tree | 8fda811f62cb6ffb99847befb7b74b1519ea95ba /res/res_config_sqlite.c | |
parent | 0fb9c73a989207650aa3ba603824e4593809611b (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_config_sqlite.c')
-rw-r--r-- | res/res_config_sqlite.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/res/res_config_sqlite.c b/res/res_config_sqlite.c index c9c65f881..fd28ef62d 100644 --- a/res/res_config_sqlite.c +++ b/res/res_config_sqlite.c @@ -300,14 +300,14 @@ static int add_cfg_entry(void *arg, int argc, char **argv, char **columnNames); * \param table the table to use * \param file the file to load from the database * \param cfg the struct ast_config object to use when storing variables - * \param withcomments Integer. Flag + * \param flags Optional flags. Not used. * \retval cfg object * \retval NULL if an error occurred * \see add_cfg_entry() */ static struct ast_config * config_handler(const char *database, const char *table, const char *file, - struct ast_config *cfg, int withcomments); + struct ast_config *cfg, struct ast_flags flags); /*! * \brief Helper function to parse a va_list object into 2 dynamic arrays of @@ -611,8 +611,9 @@ static int load_config(void) struct ast_config *config; struct ast_variable *var; int error; + struct ast_flags config_flags = { 0 }; - config = ast_config_load(RES_SQLITE_CONF_FILE); + config = ast_config_load(RES_SQLITE_CONF_FILE, config_flags); if (!config) { ast_log(LOG_ERROR, "Unable to load " RES_SQLITE_CONF_FILE "\n"); @@ -725,7 +726,7 @@ static int add_cfg_entry(void *arg, int argc, char **argv, char **columnNames) } static struct ast_config *config_handler(const char *database, - const char *table, const char *file, struct ast_config *cfg, int withcomments) + const char *table, const char *file, struct ast_config *cfg, struct ast_flags flags) { struct cfg_entry_args args; char *errormsg; |