diff options
author | Mark Spencer <markster@digium.com> | 2003-10-25 17:50:06 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-10-25 17:50:06 +0000 |
commit | 4d0e046a068edce8f898d17f713d3865e9d8f8dd (patch) | |
tree | c163913c8f39ede741e20c64b56d3467f9ddc0cb /pbx.c | |
parent | e425ba6c0e8f1e1e02ee4129709f2d64d10e35d8 (diff) |
Verify includes, and give warnings if invalid (bug #429)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -4644,3 +4644,17 @@ struct ast_ignorepat *ast_walk_context_ignorepats(struct ast_context *con, else return ip->next; } + +int ast_context_verify_includes(struct ast_context *con) +{ + struct ast_include *inc; + int res = 0; + + for (inc = ast_walk_context_includes(con, NULL); inc; inc = ast_walk_context_includes(con, inc)) + if (!ast_context_find(inc->rname)) { + res = -1; + ast_log(LOG_WARNING, "Context '%s' tries includes non-existant context '%s'\n", + ast_get_context_name(con), inc->rname); + } + return res; +} |