Commit Graph

564 Commits (59692c5e94a00a2561bb2876f67d4ab70bafdc5c)

Author SHA1 Message Date
Luigi Rizzo a0f06d0dd5 start using asterisk/network.h for network related headers.
19 years ago
Russell Bryant 49d1248c55 fix the build of pbx_lua
19 years ago
Luigi Rizzo 5490960453 remove a bunch of duplicate includes
19 years ago
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
19 years ago
Luigi Rizzo 7f8ecd2cd3 make the 'name' and 'value' fields in ast_variable const char *
19 years ago
Jason Parker cfbc4f5fb8 Doxygen fixes.
19 years ago
Steve Murphy 98429d37b2 Based on a note in asterisk-dev by Brian Capouch, I determined I too agressive in not initializing arrays passed to pbx_substitute_variables_xxxx; I reviewed the code (again) and hopefully found every possible spot where substitute_variables is called conditionally, and made sure the char array involved was set to a null string.
19 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.
19 years ago
Jason Parker 267e829cbd Add check_hangup() method to pbx_lua, which can be used to check whether it is time to hangup a channel.
19 years ago
Kevin P. Fleming edc78d6023 improve linked-list macros in two ways:
19 years ago
Russell Bryant c93520b88b propagate the DECLINE return value back to the loader
19 years ago
Russell Bryant 9a47852673 Don't kill asterisk if extensions.lua is not present.
19 years ago
Tilghman Lesher ca55e2f671 Oops, some dev-mode changes for ISO C90
19 years ago
Tilghman Lesher e8c781b215 Add pbx_lua as a method of doing extensions
19 years ago
Steve Murphy 63f2f04cf4 This commits the performance mods that give the priority processing engine in the pbx, a 25-30% speed boost. The two updates used, are, first, to merge the ast_exists_extension() and the ast_spawn_extension() where they are called sequentially in a loop in the code, into a slightly upgraded version of ast_spawn_extension(), with a few extra args; and, second, I modified the substitute_variables_helper_full, so it zeroes out the byte after the evaluated string instead of demanding you pre-zero the buffer; I also went thru the code and removed the code that zeroed this buffer before every call to the substitute_variables_helper_full. The first fix provides about a 9% speedup, and the second the rest. These figures come from the 'PIPS' benchmark I describe in blogs, conf. reports, etc.
19 years ago
Russell Bryant 1c7eb1d82b Change some uses of free() to ast_free(). (No functional differences.)
19 years ago
Steve Murphy c9f3efc381 Merged revisions 87168 via svnmerge from
19 years ago
Steve Murphy b7ef49c931 closes issue #11005, where #include uses the current dir instead of the config dir (/etc/asterisk) for relative path includes for AEL
19 years ago
Jason Parker ebe4050128 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
19 years ago
Joshua Colp 9409a33900 Merged revisions 86661 via svnmerge from
19 years ago
Jason Parker b0f3e6097e Convert NEW_CLI to AST_CLI.
19 years ago
Jason Parker ed690fc348 Switch dundi to new tos config format.
19 years ago
Russell Bryant be54dc15e5 Simplify buffer handling in dundi-parser.c. This also makes the code a bit
19 years ago
Russell Bryant 3f2e8db598 Merged revisions 85556 via svnmerge from
19 years ago
Russell Bryant ac46e63a41 Merged revisions 85540 via svnmerge from
19 years ago
Russell Bryant e5853d8409 Merged revisions 85515 via svnmerge from
19 years ago
Russell Bryant e97a723cf1 Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)
19 years ago
Steve Murphy 3ffa04bbd3 Merged revisions 84511 via svnmerge from
19 years ago
Steve Murphy b3168a76c9 Merged revisions 84239 via svnmerge from
19 years ago
Russell Bryant d78463be1e Corydon posted this janitor project to the bug tracker and mvanbaak provided
19 years ago
Steve Murphy c782398ca4 the last commit for AEL affected a small number of tests. Added a regression test for glob'd includes
19 years ago
Russell Bryant 41d513f443 Merged revisions 83976 via svnmerge from
19 years ago
Steve Murphy f2b38cf2f3 Merged revisions 83558 via svnmerge from
19 years ago
Russell Bryant 9f64905d4e Merged revisions 83432 via svnmerge from
19 years ago
Joshua Colp 6489076887 Fix memory leaks in pbx_dundi, cdr_pgsql, and the configuration file parser.
19 years ago
Russell Bryant 3d7cf301d8 Merged revisions 82802 via svnmerge from
19 years ago
Russell Bryant 9388173f85 Make the MALLOC_DEBUG output for free() useful again. After changing calls to
19 years ago
Jason Parker 584a510d20 Merged revisions 82358 via svnmerge from
19 years ago
Russell Bryant c0f72f5311 Merged revisions 82250 via svnmerge from
19 years ago
Joshua Colp 078595f5c5 Merged revisions 82243 via svnmerge from
19 years ago
Steve Murphy b5cd67adc3 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
19 years ago
Russell Bryant 2f4a2811b6 Add proper channel locking around the uses of datastore_add and _find. There
19 years ago
Russell Bryant 44795584b2 This should have been trunk only, I guess. oh well ... it's harmless.
19 years ago
Russell Bryant adcd4d4ab4 Merged revisions 81074 via svnmerge from
19 years ago
Russell Bryant 8d4761f8d3 localize a variable and remove a duplicate error message
19 years ago
Steve Murphy 83e28341b5 an unreported crash I debugged, looked like it was backing up way too far after hitting the syntax error. An inspection of the code revealed that error tokens in lists were not rearranged when the rules were rearranged as part of a code neatening-up process. By moving the error tokens to where they should be, I also reduced the number of shift/reduce conflicts to 3 instead of 8. This introduces subtle differences in error messages, so the regressions had to be updated.
19 years ago
Jason Parker fafa7d93e4 Correct the argument separator for a Dial statement in pbx_dundi.
19 years ago
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
19 years ago
Joshua Colp 3f998a86a1 (closes issue #10467)
19 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.
19 years ago