summaryrefslogtreecommitdiff
path: root/res/res_sorcery_config.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2013-12-17 18:35:39 +0000
committerJoshua Colp <jcolp@digium.com>2013-12-17 18:35:39 +0000
commit91d0f305061a6111d9996750c04d54daa67b67bb (patch)
treec81560d9afc1e76029801a344716dd1eff27c026 /res/res_sorcery_config.c
parent9fc2cc178a8685dcb3afb9ed9d820f17d39dc4cd (diff)
res_sorcery_config: Output an error message when an object can't be created.
If object creation fails an error message will now be output with the id, type, and configuration file. ........ Merged revisions 404029 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_sorcery_config.c')
-rw-r--r--res/res_sorcery_config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_sorcery_config.c b/res/res_sorcery_config.c
index c6ec62ed6..608413226 100644
--- a/res/res_sorcery_config.c
+++ b/res/res_sorcery_config.c
@@ -265,14 +265,15 @@ static void sorcery_config_internal_load(void *data, const struct ast_sorcery *s
if (!(obj = ast_sorcery_alloc(sorcery, type, id)) ||
ast_sorcery_objectset_apply(sorcery, obj, ast_variable_browse(cfg, id))) {
- ast_debug(1, "Could not create an object of type '%s' with id '%s' from configuration file '%s'\n",
- type, id, config->filename);
if (config->file_integrity) {
ast_log(LOG_ERROR, "Config file '%s' could not be loaded due to error with object '%s' of type '%s'\n",
config->filename, id, type);
ast_config_destroy(cfg);
return;
+ } else {
+ ast_log(LOG_ERROR, "Could not create an object of type '%s' with id '%s' from configuration file '%s'\n",
+ type, id, config->filename);
}
ao2_cleanup(obj);