Commit Graph

93 Commits (02f55a36a0b8e38631c90cb3465085fbc6ed796c)

Author SHA1 Message Date
Kinsey Moore 9b16c8b0f6 Clean up and ensure proper usage of alloca()
13 years ago
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
14 years ago
Tilghman Lesher 79fdf2945e Merged revisions 310462 via svnmerge from
14 years ago
Jeff Peeler 54f2dfc91c Merged revisions 271399 via svnmerge from
15 years ago
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
16 years ago
Joshua Colp 654ea55a65 Numerous documentation updates.
17 years ago
Steve Murphy 1a37ee4025 A possibly "horrible fix" for a "horribly broken"
17 years ago
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
17 years ago
Michiel van Baak 86f900b201 This commit does two things:
17 years ago
Kevin P. Fleming 629861a705 Merged revisions 144924-144925 via svnmerge from
17 years ago
Steve Murphy 2427603eaf Merged revisions 111341 via svnmerge from
17 years ago
Steve Murphy 377e51c4d4 (closes issue #6002)
17 years ago
Russell Bryant 1ec8cb41a8 Merge changes from team/mvanbaak/cli-command-audit
17 years ago
Luigi Rizzo ffd86fc964 more errno.h removal
18 years ago
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
18 years ago
Steve Murphy a897556f7f This is the perhaps the biggest, boldest, most daring change I've ever committed to trunk. Forgive me in advance any disruption this may cause, and please, report any problems via the bugtracker. The upside is that this can speed up large dialplans by 20 times (or more). Context, extension, and priority matching are all fairly constant-time searches. I introduce here my hashtables (hashtabs), and a regression for them. I would have used the ast_obj2 tables, but mine are resizeable, and don't need the object destruction capability. The hashtab stuff is well tested and stable. I introduce a data structure, a trie, for extension pattern matching, in which knowledge of all patterns is accumulated, and all matches can be found via a single traversal of the tree. This is per-context. The trie is formed on the first lookup attempt, and stored in the context for future lookups. Destruction routines are in place for hashtabs and the pattern match trie. You can see the contents of the pattern match trie by using the 'dialplan show' cli command when 'core set debug' has been done to put it in debug mode. The pattern tree traversal only traverses those parts of the tree that are interesting. It uses a scoreboard sort of approach to find the best match. The speed of the traversal is more a function of the length of the pattern than the number of patterns in the tree. The tree also contains the CID matching patterns. See the source code comments for details on how everything works. I believe the approach general enough that any issues that might come up involving fine points in the pattern matching algorithm, can be solved by just tweaking things. We shall see. The current pattern matcher is fairly involved, and replicating every nuance of it is difficult. If you find and report problems, I will try to resolve than as quickly as I can. The trie and hashtabs are added to the existing context and exten structs, and none of the old machinery has been removed for the sake of the multitude of functions that use them. In the future, we can (maybe) weed out the linked lists and save some space.
18 years ago
Steve Murphy c9f3efc381 Merged revisions 87168 via svnmerge from
18 years ago
Jason Parker ebe4050128 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
18 years ago
Jason Parker b0f3e6097e Convert NEW_CLI to AST_CLI.
18 years ago
Russell Bryant e97a723cf1 Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)
18 years ago
Steve Murphy b3168a76c9 Merged revisions 84239 via svnmerge from
18 years ago
Steve Murphy f2b38cf2f3 Merged revisions 83558 via svnmerge from
18 years ago
Steve Murphy 9836efb5fb This commit closes bug 7605, and half-closes 7638. The AEL code has been redistributed/repartitioned to allow code re-use both inside and outside of Asterisk. This commit introduces the utils/conf2ael program, and an external config-file reader, for both normal config files, and for extensions.conf (context, exten, prio); It provides an API for programs outside of asterisk to use to play with the dialplan and config files.
18 years ago
Steve Murphy d9b52497f0 Merged revisions 79255 via svnmerge from
18 years ago
Steve Murphy ceca4d97e1 These fixes take care of two problems: a complaint in asterisk-dev that goto's aren't working in trunk, a side effect of the move to commas as arg seps in apps and funcs; and a problem I spotted myself with dial's 'e' option, where gotos were off by one, because I forgot to set the AUTOLOOP flag in the peer channel.
18 years ago
Steve Murphy f7213d2411 The upgrade of application argument separators to comma has an effect on AEL; I commented out the code that substitutes commas with vertbars, so we can get apps to parse their args correctly.
18 years ago
Steve Murphy 8b0b74c9b0 Spotted this bug today myself, trying to reproduce a BE bug. Use a vert bar instead of a comma, when calling RAND.
18 years ago
Steve Murphy 6a4efe5d5a In regards to changes for 9508, expr2 system choking on floating point numbers, I'm adding this update to round out (no pun intended) and make this FP-capable version of the Expr2 stuff interoperate better with previous integer-only usage, by providing Functions syntax, with 20 builtin functions for floating pt to integer conversions, and some general floating point math routines that might commonly be used also. Along with this, I made it so if a function was not a builtin, it will try and find it in the ast_custom_function list, and if found, execute it and collect the results. Thus, you can call system functions like CDR(), CHANNEL(), etc, from within $\[..\] exprs, without having to wrap them in $\{...\} (curly brace) notation. Did a valgrind on the standalone and made sure there's no mem leaks. Looks good. Updated the docs, too.
18 years ago
Steve Murphy c1bb0fc34b This finishes the changes for making Macro args LOCAL to the call, and allowing users to declare local variables.
18 years ago
Tilghman Lesher 704c756c4a Merge work to make U(...) option work for Dial
18 years ago
Steve Murphy 52efde5c65 Merged revisions 67526 via svnmerge from
18 years ago
Steve Murphy 00b33aaa49 Merged revisions 67420 via svnmerge from
18 years ago
Steve Murphy f120c26ec1 Merged revisions 59688 via svnmerge from
18 years ago
Steve Murphy e1476b8aab Merged revisions 59261 via svnmerge from
18 years ago
Steve Murphy 3433b64703 Merged revisions 59228 via svnmerge from
18 years ago
Steve Murphy e6d32d3132 The fix for the AEL <<security hole>> (bug 9316) is here...
18 years ago
Steve Murphy 91a9b97a73 Merged revisions 57426 via svnmerge from
18 years ago
Steve Murphy bca20ed71e Merged revisions 57049 via svnmerge from
18 years ago
Olle Johansson 75d387acbc Doxygen additions, corrections
18 years ago
Steve Murphy 85f65b1ff0 Merged revisions 51409 via svnmerge from
19 years ago
Steve Murphy b96a97e315 Merged revisions 49061 via svnmerge from
19 years ago
Joshua Colp 23ebec40a5 Clean up last commit to better conform to standards.
19 years ago
Steve Murphy 4115ea029d AEL need not complain about parkedcalls not being found... just confuses users
19 years ago
Kevin P. Fleming 749029de38 Merged revisions 46200 via svnmerge from
19 years ago
Steve Murphy 8567b0ee84 Correction for bug 8128 in trunk
19 years ago
Steve Murphy 6f34a8d78d These mods fix a problem pointed out by dgartang, where in certain situations, the target of a goto cannot be found, even right under your nose. This is because the current context is not updated properly, and rather than waste time and find why and where the context should have been updated, I just use my newly added 'dad' ptrs, and pop until I have either the context or extension, and use that instead.
19 years ago
Steve Murphy de7a85105a These changes resolve the problems in bug 8090, where there's a crash compiling an empty context
19 years ago
Steve Murphy 19dc73ad40 These changes correspond to the changes to app_stack's Gosub() application
19 years ago
Steve Murphy 35b951d2ac This commits the changes to AEL to use the gosub-with-args from Tilghman to perform macro calls. This results in substantially smaller stack footprint, which allows macro call depths in excess of 100,000 levels, rather than the limit of 7 calls deep, which the Macro app is subject to.
19 years ago
Steve Murphy bcdb270c57 This commits a change to return MODULE_LOAD_FAILURE on error, and SUCCESS (instead of 0) when all goes well for bug 8004
19 years ago