]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
closes issue #10777 -- by returning a null for the parse tree when there's really...
authorSteve Murphy <murf@digium.com>
Mon, 1 Oct 2007 20:27:52 +0000 (20:27 +0000)
committerSteve Murphy <murf@digium.com>
Mon, 1 Oct 2007 20:27:52 +0000 (20:27 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84239 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/ael/ael.tab.c
pbx/ael/ael.y
pbx/pbx_ael.c

index ba66f196fd317e4f77463fb1bd09f9313978122f..53527ffe806a5704387e75d825b3c24594e3569e 100644 (file)
@@ -2123,8 +2123,8 @@ yyreduce:
                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);
index 7cc758d7c532626f43e73ed3b98eeb0f6e4c387f..657e970675f81306acb5d58eb83bd3c736c93535 100644 (file)
@@ -204,8 +204,8 @@ context : opt_abstract KW_CONTEXT context_name LC elements RC {
                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;
index ff9b95edb1ae85bebdadaf07e2b218f4cb643c5c..af55c931551071faebd808e40f26bff300a19975 100644 (file)
@@ -109,9 +109,9 @@ void destroy_pval_item(pval *item);
 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 @@ static void ael2_semantic_check(pval *item, int *arg_errs, int *arg_warns, int *
 #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);