[Asterisk-cvs] asterisk pbx.c,1.60,1.61
markster at lists.digium.com
markster at lists.digium.com
Sat Oct 25 12:23:59 CDT 2003
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv5772
Modified Files:
pbx.c
Log Message:
Verify includes, and give warnings if invalid (bug #429)
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- pbx.c 23 Oct 2003 03:55:58 -0000 1.60
+++ pbx.c 25 Oct 2003 17:50:06 -0000 1.61
@@ -4644,3 +4644,17 @@
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;
+}
More information about the svn-commits
mailing list