Steve Murphy
7f77c58ed5
(closes issue #11903 )
...
Reported by: atis
Many thanks to atis for spotting this problem and reporting it.
The fix was to straighten out how items are placed on and removed
from the file stack. Regressions as well as the provided test case
helped to straighten out all code paths. valgrind was used to make
sure all memory allocated was freed.
Sorry for not solving this earlier. I got distracted.
Added the ntest23 regression test, which is mainly a copy of ntest22,
but with a few juicy errors thrown in, to replicate the kind of
error that atis spotted.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@109309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 06:37:15 +00:00
Steve Murphy
b04af32888
Applied the same fixes for ael.flex as was done in 97849 for ast_expr2.fl; overrode the normally generate yyfree func with our own version that checks the pointer for non-null before passing to free(). Also takes care of a little problem with 2.5.33 and the use of the __STDC_VERSION__ macro.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 21:37:10 +00:00
Steve Murphy
4c7393a6a4
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
2007-10-26 16:34:02 +00:00
Steve Murphy
94aabf9844
closes issue #11037 -- unable to specify app:spec in hint arguments
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-24 04:14:28 +00:00
Steve Murphy
ed75fa38e9
closes issue #10834 ; where a null input to a switch statement results in a hangup; since switch is implemented with extensions, and the default case is implemented with a '.', and the '.' matches 1 or more remaining characters, the case where 0 characters exist isn't matched, and the extension isn't matched, and the goto fails, and a hangup occurs. Now, when a default case is generated, it also generates a single fixed extension that will match a null input. That extension just does a goto to the default extension for that switch. I played with an alternate solution, where I just tack an extra char onto all the patterns and the goto, but not the default case's pattern. Then even a null input will still have at least one char in it. But it made me nervous, having that extra char in , even if that's a pretty secret and low-level issue.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-03 14:23:00 +00:00
Steve Murphy
b7f66e48e8
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.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 20:27:52 +00:00
Steve Murphy
fce1741a01
This is a regression update that matches what I did in 84134 for AEL regressions.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-29 23:00:37 +00:00
Steve Murphy
0ffda2d201
This issue sort of closes 10786; All config files support #include with globbing (you know, *,[chars],?,{list,list},etc), so I've updated the AEL system to support this also.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-29 21:47:53 +00:00
Russell Bryant
d6b8fb4dc0
gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set of
...
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2.
(closes issue #10774 , patch from qwell)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21 14:37:20 +00:00
Steve Murphy
765b1af228
backport of 80649, a fix to an unreported problem in the ael parser, that results in a crash on a 64bit machine
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 13:20:18 +00:00
Steve Murphy
9020699e0a
This patch fixes bug 10411. I added a new regression test, some regression test cleanups
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 17:49:54 +00:00
Steve Murphy
dc63d79143
this fixes bug 9883, wherein macros were not allowing the includes construct. fixed and tested, looks OK. Now includes can serve as an adjunct to catch.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@67526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 21:30:18 +00:00
Steve Murphy
9056b0fa09
updated the ael regressions to match what's in trunk
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@62913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 14:41:53 +00:00
Steve Murphy
fd54b47404
These mods fix bug 9623, where an '@' in the eswitch contents causes a syntax error. I also updated the regressions.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@62883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 13:54:56 +00:00
Steve Murphy
19e8d3fdcb
A fix for the flex input files, DONT_COMPILE, and STANDALONE_AEL
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 17:38:29 +00:00
Joshua Colp
ca9872278b
Have ast_copy_string magically appear in the aelparse binary! DONT_OPTIMIZE should now work once again.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 15:16:29 +00:00
Steve Murphy
b899145141
Updated the regression tests
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@57707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-03 15:31:12 +00:00
Steve Murphy
49cce60e51
This is a slight modification to Josh's edits for #8579 ; both files edited were the produced by flex; so the source files need to be changed instead, and the generated files regenerated.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-02 22:30:53 +00:00
Steve Murphy
4d6a91eef0
removed <err.h> as in trunk from the ael stuff. Also, threw in a minor fix to frame.c to avoid build-killing compiler warnings.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-28 19:21:56 +00:00
Joshua Colp
6d582d75c7
ast_copy_string is not available when LOW_MEMORY is used and things are being built in the utils directory, so we need to resort to the old method of strncpy. (issue #8579 reported by mottano)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-27 22:28:46 +00:00
Steve Murphy
a619d5c3e0
Eager people beat me to fixing the messed if, but we all forgot to update the regressions. Until now.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 18:18:06 +00:00
Steve Murphy
dc04209898
Bug 8128 fixed in this release via these changes
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@45103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 20:52:17 +00:00
Steve Murphy
c37666252d
These changes fix the problems reported in bug 8090
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@44380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 19:57:08 +00:00
Steve Murphy
6557d250c8
This commit is a basic AEL enhancement: c-style comments
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 02:53:15 +00:00
Steve Murphy
51132bbdbf
Changes to fix all problems reported in 7804 are included here.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 20:43:51 +00:00
Steve Murphy
834c7265de
This commit merges the contents of 7721, as it applied to the trunk version. Added the item that would previously trigger a false error to test1.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-12 19:28:33 +00:00
Steve Murphy
1d2b76a0f8
added a -q for quiet, option to aelparse
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-11 21:30:03 +00:00
Steve Murphy
980a79a24d
This bug adds enhancement as per bug 7606, the -w
...
option to aelparse.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-09 01:16:37 +00:00
Steve Murphy
14c12fed9b
The contents of branch teams/murf/bug_7598 are being folded in here.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 12:59:47 +00:00
Steve Murphy
f67f6b2261
This branch will resolve the bug 7635.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01 19:03:32 +00:00
Steve Murphy
db0b142b06
committing a fix for colons in goto arguments and suppressing operator messages in globals assignments.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 02:55:24 +00:00
Steve Murphy
04ed725e73
OK, here is everything I changed to fix 7474:
...
1. ael/ael.flex -- the "fix" is here. In short, I modified the
pattern for the chars that break args, to exclude those chars that
would normally break args if they are preceded by a backslash. I did
this to 3 patterns where really, this kind of exclusion should be placed.
2. ael_lex.c is an updated output from lex.
3. the ael-test stuff -- instituted a regression test for this condition.
as ael_ntest9. The "n" in the name means that instead of just getting
the syntax/semantic errors and high-level output from aelparse, we
also want the compilation results to be in the comparison file.
(remove the -n option).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 22:49:18 +00:00
Russell Bryant
73ae55698f
merge changes from team/murf/AEL-trunk-fixesonly
...
- fix callerid matching for extensions
- fix nested switch statements
- fix compilation with bison 2.1a or higher
(issue #7309 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 21:36:24 +00:00
Russell Bryant
171992e505
don't use ast_copy_string when building for an external tool
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-10 04:41:34 +00:00
Kevin P. Fleming
b31b0be819
various minor portability fixes (mostly from tholo for OpenBSD)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 20:26:25 +00:00
Kevin P. Fleming
472c1ca282
simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Luigi Rizzo
b569ebd593
more simplifications
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 17:07:56 +00:00
Luigi Rizzo
5f612f9ae6
consistent rule for goto...
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:58:16 +00:00
Luigi Rizzo
e5b0c721e5
remove another useless nonterminal
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:46:55 +00:00
Luigi Rizzo
34d67f7d09
remove a useless nonterminal
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:38:50 +00:00
Luigi Rizzo
49227c7ba1
more simplifications
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:37:14 +00:00
Luigi Rizzo
7695df3896
remove more shift-reduce conflicts
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:34:31 +00:00
Luigi Rizzo
820ef22951
remove a redundant rule
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:33:00 +00:00
Luigi Rizzo
673607f87a
reduce shift/reduce warnings
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:28:48 +00:00
Luigi Rizzo
9ebc190fdc
simplify case_statements
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:12:31 +00:00
Luigi Rizzo
e2e92e49a6
switch statement in one place
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:08:35 +00:00
Luigi Rizzo
7cc4511fa2
common syntax for context name
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:00:49 +00:00
Luigi Rizzo
34dcc89e24
another instance of context name
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:50:18 +00:00
Luigi Rizzo
7a625b894d
fix a bug previously introduced in the handling of timespec.
...
Fortunately we have regression tests!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:44:56 +00:00
Luigi Rizzo
0cf25becb9
simplify case statements
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:18:02 +00:00