closes issue #11086 where a user complains that references to following contexts report a problem; The problem was REALLy that he was referring to empty contexts, which were being ignored. Reporter stated that empty contexts should be OK. I checked it out against extensions.conf, and sure enough, empty contexts ARE ok. So, I removed the restriction from AEL. This, though, highlighted a problem with multiple contexts of the same name. This should be OK, also. So, I added the extend keyword to AEL, and it can preceed the 'context' keyword (mixed with 'abstract', if nec.). This will turn off the warnings in AEL if the same context name is used 2 or more times. Also, I now call ast_context_find_or_create for contexts now, instead of just ast_context_create; I did this because pbx_config does this. The 'extend' keyword thus becomes a statement of intent. AEL can now duplicate the behavior of pbx_config,

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Steve Murphy
2007-10-26 16:34:02 +00:00
parent aa7f0bf1b2
commit 4c7393a6a4
10 changed files with 1124 additions and 1088 deletions

View File

@@ -2,13 +2,13 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
LOG: lev:2 file:pbx_ael.c line:3978 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:pbx_ael.c line:3985 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3993 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:4 file:pbx_ael.c line:2250 func: check_context_names Error: file ./extensions.ael, line 49-62: The context name (incoming) is also declared in file ./extensions.ael, line 62-69!
LOG: lev:2 file:pbx_ael.c line:4090 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:pbx_ael.c line:4097 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:4105 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:4 file:pbx_ael.c line:2250 func: check_context_names Error: file ./extensions.ael, line 49-62: The context name (incoming) is also declared in file ./extensions.ael, line 62-69! (and neither is marked 'extend')
LOG: lev:3 file:pbx_ael.c line:2234 func: check_switch_expr Warning: file ./extensions.ael, line 245-246: A default case was automatically added to the switch.
LOG: lev:3 file:pbx_ael.c line:2347 func: check_pval_item Warning: file ./extensions.ael, line 312-312: macro call to non-existent funcA ! Hopefully it is present in extensions.conf!
LOG: lev:3 file:pbx_ael.c line:2347 func: check_pval_item Warning: file ./extensions.ael, line 313-313: macro call to non-existent funcD ! Hopefully it is present in extensions.conf!
LOG: lev:3 file:pbx_ael.c line:1287 func: check_goto Warning: file ./extensions.ael, line 319-319: goto: no context test5 could be found that matches the goto target!
LOG: lev:4 file:pbx_ael.c line:4006 func: pbx_load_module Sorry, but 0 syntax errors and 1 semantic errors were detected. It doesn't make sense to compile.
LOG: lev:4 file:ael2_parse line:523 func: main 0 contexts, 0 extensions, 0 priorities
LOG: lev:4 file:pbx_ael.c line:4118 func: pbx_load_module Sorry, but 0 syntax errors and 1 semantic errors were detected. It doesn't make sense to compile.
LOG: lev:4 file:ael2_parse line:543 func: main 0 contexts, 0 extensions, 0 priorities