aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_config.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 16:50:11 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 16:50:11 +0000
commitd23c3140a2376bf26b018476da2ea4e54ae2a25c (patch)
treeeb02782dac547f0427906df025a25a5cbda25d35 /pbx/pbx_config.c
parentd4e1347af6a2def900790515c76b5620f462ffb3 (diff)
Be more detailed about why the include did not get included.
(closes issue #14071) Reported by: kshumard Patches: pbx_config.patch.improvederroroutput.txt uploaded by kshumard (license 92) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164733 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_config.c')
-rw-r--r--pbx/pbx_config.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index dac6389c3..8b8abb3db 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -1557,7 +1557,31 @@ process_extension:
} else if (!strcasecmp(v->name, "include")) {
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
if (ast_context_add_include2(con, realvalue, registrar)) {
- ast_log(LOG_WARNING, "Unable to include context '%s' in context '%s'\n", v->value, cxt);
+ switch (errno) {
+ case ENOMEM:
+ ast_log(LOG_WARNING, "Out of memory for context addition\n");
+ break;
+
+ case EBUSY:
+ ast_log(LOG_WARNING, "Failed to lock context(s) list, please try again later\n");
+ break;
+
+ case EEXIST:
+ ast_log(LOG_WARNING, "Context '%s' already included in '%s' context\n",
+ v->value, cxt);
+ break;
+
+ case ENOENT:
+ case EINVAL:
+ ast_log(LOG_WARNING, "There is no existence of context '%s'\n",
+ errno == ENOENT ? v->value : cxt);
+ break;
+
+ default:
+ ast_log(LOG_WARNING, "Failed to include '%s' in '%s' context\n",
+ v->value, cxt);
+ break;
+ }
}
} else if (!strcasecmp(v->name, "ignorepat")) {
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);