[svn-commits] russell: branch 1.4 r105591 - /branches/1.4/main/pbx.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Mar 3 22:31:30 CST 2008
Author: russell
Date: Mon Mar 3 22:31:29 2008
New Revision: 105591
URL: http://svn.digium.com/view/asterisk?view=rev&rev=105591
Log:
Backport a minor bug fix from trunk that I found while doing random code
cleanup. Properly break out of the loop when a context isn't found when
verify that includes are valid.
Modified:
branches/1.4/main/pbx.c
Modified: branches/1.4/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/pbx.c?view=diff&rev=105591&r1=105590&r2=105591
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Mon Mar 3 22:31:29 2008
@@ -6305,12 +6305,16 @@
struct ast_include *inc = NULL;
int res = 0;
- while ( (inc = ast_walk_context_includes(con, inc)) )
- if (!ast_context_find(inc->rname)) {
- res = -1;
- ast_log(LOG_WARNING, "Context '%s' tries includes nonexistent context '%s'\n",
- ast_get_context_name(con), inc->rname);
- }
+ while ( (inc = ast_walk_context_includes(con, inc)) ) {
+ if (ast_context_find(inc->rname))
+ continue;
+
+ res = -1;
+ ast_log(LOG_WARNING, "Context '%s' tries includes nonexistent context '%s'\n",
+ ast_get_context_name(con), inc->rname);
+ break;
+ }
+
return res;
}
More information about the svn-commits
mailing list