[asterisk-commits] murf: branch 1.4 r84239 - in /branches/1.4/pbx: ./ ael/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 1 15:27:52 CDT 2007
Author: murf
Date: Mon Oct 1 15:27:52 2007
New Revision: 84239
URL: http://svn.digium.com/view/asterisk?view=rev&rev=84239
Log:
closes issue #10777 -- by returning a null for the parse tree when there's really nothing there, and making sure we don't try to do checking on a null tree.
Modified:
branches/1.4/pbx/ael/ael.tab.c
branches/1.4/pbx/ael/ael.y
branches/1.4/pbx/pbx_ael.c
Modified: branches/1.4/pbx/ael/ael.tab.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael.tab.c?view=diff&rev=84239&r1=84238&r2=84239
==============================================================================
--- branches/1.4/pbx/ael/ael.tab.c (original)
+++ branches/1.4/pbx/ael/ael.tab.c Mon Oct 1 15:27:52 2007
@@ -2123,8 +2123,8 @@
if (!(yyvsp[(5) - (6)].pval)) {
ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Warning! The empty context %s will be IGNORED!\n",
my_file, (yylsp[(4) - (6)]).first_line, (yylsp[(4) - (6)]).first_column, (yylsp[(4) - (6)]).last_column, (yyvsp[(3) - (6)].str) );
+ (yyval.pval) = 0;
free((yyvsp[(3) - (6)].str));
-
} else {
(yyval.pval) = npval2(PV_CONTEXT, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
(yyval.pval)->u1.str = (yyvsp[(3) - (6)].str);
Modified: branches/1.4/pbx/ael/ael.y
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael.y?view=diff&rev=84239&r1=84238&r2=84239
==============================================================================
--- branches/1.4/pbx/ael/ael.y (original)
+++ branches/1.4/pbx/ael/ael.y Mon Oct 1 15:27:52 2007
@@ -204,8 +204,8 @@
if (!$5) {
ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Warning! The empty context %s will be IGNORED!\n",
my_file, @4.first_line, @4.first_column, @4.last_column, $3 );
+ $$ = 0;
free($3);
-
} else {
$$ = npval2(PV_CONTEXT, &@1, &@6);
$$->u1.str = $3;
Modified: branches/1.4/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/pbx_ael.c?view=diff&rev=84239&r1=84238&r2=84239
==============================================================================
--- branches/1.4/pbx/pbx_ael.c (original)
+++ branches/1.4/pbx/pbx_ael.c Mon Oct 1 15:27:52 2007
@@ -109,9 +109,9 @@
int is_float(char *arg );
int is_int(char *arg );
int is_empty(char *arg);
-static pval *current_db;
-static pval *current_context;
-static pval *current_extension;
+static pval *current_db=0;
+static pval *current_context=0;
+static pval *current_extension=0;
static const char *match_context;
static const char *match_exten;
@@ -2733,6 +2733,8 @@
#endif
struct argapp *apps=0;
+ if (!item)
+ return; /* don't check an empty tree */
#ifdef AAL_ARGCHECK
rfilename = alloca(10 + strlen(ast_config_AST_VAR_DIR));
sprintf(rfilename, "%s/applist", ast_config_AST_VAR_DIR);
More information about the asterisk-commits
mailing list