Commit Graph

240 Commits (master)

Author SHA1 Message Date
Kinsey Moore 781f4657b9 Fix many issues from the NULL_RETURNS Coverity report
13 years ago
Terry Wilson f7c174ff84 Multiple revisions 364365,364369
13 years ago
Kinsey Moore c5b3db1956 Kill off red blobs in most of main/*
13 years ago
Tilghman Lesher a78b0af5ea Re-commit the verbose branch.
13 years ago
Kinsey Moore 25e344168e Make the config parser remove escaping backslashes
13 years ago
Matthew Jordan 9057aa20b6 Backed out core changes from r346391
14 years ago
Tilghman Lesher 56b21b4683 Remove the few places where we try to ast_verbose() without a newline.
14 years ago
Paul Belanger 298d015828 Add #tryinclude statement
14 years ago
Walter Doekes b41b49ea0e Several fixes to the chan_sip dynamic realtime peer/user lookup
14 years ago
Walter Doekes 25ee5f83b5 Cleanup references to sipusers and sipfriends dynamic realtime families
14 years ago
Terry Wilson 700f0a2752 Return NULL when no results returned for realtime_multientry
14 years ago
Richard Mudgett 220bf14557 Merged revisions 334297 via svnmerge from
14 years ago
Richard Mudgett 76a808ed22 Merged revisions 332940 via svnmerge from
14 years ago
Richard Mudgett b8748f4c00 Merged revisions 332761 via svnmerge from
14 years ago
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
14 years ago
Andrew Latham 9f1a17f137 Replacing doc/* with wiki links
14 years ago
Sean Bright 6abfc32125 Clarify a source comment about configuration template categories.
14 years ago
Jason Parker 7dd1392fba Merged revisions 283882 via svnmerge from
15 years ago
Tilghman Lesher 3ab0041118 Merge the realtime failover branch
15 years ago
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
15 years ago
Tilghman Lesher a7c92fad28 Merged revisions 277568 via svnmerge from
15 years ago
Mark Michelson cd4ebd336f Add IPv6 to Asterisk.
15 years ago
Paul Belanger 66cd1ad2ec Merged revisions 273884 via svnmerge from
15 years ago
Tilghman Lesher c8b8c90f99 Don't attempt to proceed if our internal parser indicates an invalid file.
15 years ago
Tilghman Lesher cbc311cd8f Merged revisions 272921-272922 via svnmerge from
15 years ago
Sean Bright bb03a2f7d9 Merged revisions 241015 via svnmerge from
15 years ago
Tilghman Lesher c0eb48380a Oops, didn't compile (thanks, kpfleming)
16 years ago
Tilghman Lesher f2a282ce17 Further reduce the encoded blank values back to blank in the realtime API.
16 years ago
Tilghman Lesher 3093ccb619 Merged revisions 219023 via svnmerge from
16 years ago
Tilghman Lesher 642bec4d6f AST-2009-005
16 years ago
Ryan Brindley ef667f2f82 If we delete the info, lets also delete the lines
16 years ago
Olle Johansson fa26904074 If there are no realtime engines, there's no reason to check for realtime families
16 years ago
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
17 years ago
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
17 years ago
Tilghman Lesher da8069394b The first file should have a blank config filename in the structure, so that
17 years ago
Sean Bright fd8caa1778 This is basically a complete rollback of r155401, as it was determined that
17 years ago
Ryan Brindley e27f9325ea more formatting corrections :: one line for loops and if statements still need {}
17 years ago
Ryan Brindley ad918da94f formatting changes :: one line for loops and if statements should have {}
17 years ago
Steve Murphy f68bfa4ff3 (closes issue #13420)
17 years ago
Sean Bright 30d1744ffc Add ability to pass arbitrary data to the ao2_callback_fn (called from
17 years ago
Tilghman Lesher 2cc8e25222 Slightly optimize ast_devstate_str and rename global functions devstate2str and config_text_file_save to have an ast_ prefix
17 years ago
Russell Bryant 5b168ee34b Merge changes from team/group/appdocsxml
17 years ago
BJ Weschke 9aefadd7c1 Do NOT attempt to do anything with the ast_config struct when it's been returned as INVALID by the config file interpreter.
17 years ago
Tilghman Lesher d5837ba8c2 Add additional memory debugging to several core APIs, and fix several memory
17 years ago
Tilghman Lesher c1351ad237 Merge realtime_update2 branch, which adds a new realtime API call named
17 years ago
Steve Murphy e235a07376 (closes issue #13557)
17 years ago
Tilghman Lesher 08af5bb312 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
17 years ago
Mark Michelson 5dfefa5ee6 Merged revisions 140488 via svnmerge from
17 years ago
Sean Bright b69c8e6ab5 Another big chunk of changes from the RSW branch. Bunch of stuff from main/
17 years ago
Tilghman Lesher ff101d0b07 Add '+=' append operator to configuration files.
17 years ago
Tilghman Lesher 08f3c4e4a3 Merged revisions 132107 via svnmerge from
17 years ago
Tilghman Lesher 9471b87d27 Merge the adaptive realtime branch, which will make adding new required fields
17 years ago
Jeff Peeler 5f9bb7ed02 Merged revisions 120173 via svnmerge from
17 years ago
Mark Michelson 46e68c36b6 Be sure that we cache included files for each source file which loads
17 years ago
Mark Michelson 276118a776 #execing the same file multiple times led to warning messages saying that the same file was
17 years ago
Tilghman Lesher b11854445b Add attributes to various API calls, to help track down bugs (and remove a deprecated function)
17 years ago
Tilghman Lesher e04025ead9 Simplify new macro, simplify configfile logic, now that list is sorted
17 years ago
Tilghman Lesher e6fc9ae52c Add a linkedlist macro that maintains a sorted list
17 years ago
Tilghman Lesher ef4eff9a9b Add the "config reload <conffile>" command, which allows you to tell Asterisk
17 years ago
Steve Murphy 14e1d8c6d8 Merged revisions 109908 via svnmerge from
17 years ago
Tilghman Lesher d02f74ebfe An offhand comment from Russell made me realize that the configuration file
17 years ago
Tilghman Lesher cfc1df4c1a Whitespace changes only
17 years ago
Jason Parker 84e302bfe0 Merged revisions 104092 via svnmerge from
17 years ago
Jason Parker 72bc8a7c7d Fix up some doxygen issues.
17 years ago
Jeff Peeler 16a14a4cd8 Requested changes from Pari, reviewed by Russell.
17 years ago
Jason Parker 3def286b5b Display a message if no config mappings are found with "core show config mappings".
18 years ago
Luigi Rizzo 8afacf169b add support for PARSE_DOUBLE, and remove identifiers for
18 years ago
Luigi Rizzo fd88390af7 remove unnecessary (char *) casts for ast_config_AST_* variables.
18 years ago
Russell Bryant 1e9f670e13 Print an error message if a #included file does not exist
18 years ago
Jason Parker 78465ad2a3 Merged revisions 92696 via svnmerge from
18 years ago
Luigi Rizzo 10b3c51930 remove unused code, and simplify the logic for #include/#exec
18 years ago
Luigi Rizzo d602e2c083 Implement comment_buffer and lline_buffer in terms of the ast_str_*() API.
18 years ago
Luigi Rizzo 0b7e752709 unify some common code
18 years ago
Luigi Rizzo 94b0c2220a normalize formatting
18 years ago
Luigi Rizzo 7fe5f3464d document a nice technique to exit from a block in case of errors.
18 years ago
Luigi Rizzo a077c8cb90 a little bit of documentation on how lines are parsed.
18 years ago
Russell Bryant fac7480820 Merged revisions 90348 via svnmerge from
18 years ago
Luigi Rizzo e0ff5fef5c remove a bunch of useless #include "options.h"
18 years ago
Luigi Rizzo a23c055c3d move asterisk/paths.h outside asterisk.h and into those files
18 years ago
Luigi Rizzo 9335ace850 another bunch of include removals (errno.h and asterisk/logger.h)
18 years ago
Luigi Rizzo 1e6489a175 trim more redundant headers
18 years ago
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
18 years ago
Luigi Rizzo 02733f3290 add a small new function to retrieve variables from a config
18 years ago
Tilghman Lesher 0f6892419e One more typo in config.c; and missed conversions due to the constifying of ast_variable_new parameters
18 years ago
Tilghman Lesher b4839d4d4a Typo
18 years ago
Luigi Rizzo 7f8ecd2cd3 make the 'name' and 'value' fields in ast_variable const char *
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
Kevin P. Fleming edc78d6023 improve linked-list macros in two ways:
18 years ago
Steve Murphy 9f08e7e132 Merged revisions 89036 via svnmerge from
18 years ago
Tilghman Lesher b6c7daa804 Don't re-cache the filename, but check to see if it already exists
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
Jason Parker 65761cbd7a More changes to NEW_CLI.
18 years ago
Joshua Colp 6489076887 Fix memory leaks in pbx_dundi, cdr_pgsql, and the configuration file parser.
18 years ago
Steve Murphy 95ee34a654 This fix closes issue #10642 -- it's not perfect, but should retain most blank lines in config files, via read/write cycles.
18 years ago
Russell Bryant 2a3ed7b879 remove unused functions that made this file not build under dev mode
18 years ago
Steve Murphy c88e216a14 This solves an unreported solaris compile problem (missing -lnsl -lsocket).
18 years ago
Steve Murphy dcb85e2456 this set of changes fixes issue # 10643 by keeping track of the last object defined in a file, and attaching any accumulated comments to that object (category header or variable declaration). The file_save routine also had to be upgraded to output these trailing comments. Config.h was modified to include the trailing comment list on categories and variables.
18 years ago
Tilghman Lesher 3305af34d6 Once we get past the file checks, we're loading, so clear the FILEUNCHANGED flag (fixes #include) (closes issue #10629)
18 years ago
Tilghman Lesher 87044d37a0 We shouldn't use a filename blindly without checking to make sure it's unused first
18 years ago
Steve Murphy 876ebb3ec7 init newer so compile won't complain.
18 years ago
Russell Bryant 8555b694ee make trunk build again. murf will have to review this to see if it was the right fix, as it is related to his last change.
18 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.
18 years ago
Tilghman Lesher 8b63009338 Change this flag... might not otherwise unlock in an OOM situation
18 years ago
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
18 years ago
Mark Michelson c4c0e45c8b Merged revisions 78103 via svnmerge from
18 years ago
Jason Parker 3f0a1faed2 Merged revisions 78180 via svnmerge from
18 years ago
Russell Bryant f8483a0d04 Do a massive conversion for using the ast_verb() macro
18 years ago
Luigi Rizzo 72b99a2817 Introduce ast_parse_arg() , a generic function to parse strings
18 years ago
Jason Parker a5bdba6074 Merged revisions 69470 via svnmerge from
18 years ago
Russell Bryant 055d82cbce Add a massive set of changes for converting to use the ast_debug() macro.
18 years ago
Tilghman Lesher 9d05ff8ed5 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
18 years ago
Olle Johansson 980642a846 Merged revisions 63254 via svnmerge from
18 years ago
Joshua Colp 489f9c68c3 Merged revisions 61959 via svnmerge from
18 years ago
Russell Bryant 97d0661327 Merged revisions 61690 via svnmerge from
18 years ago
Steve Murphy 69bb679e14 via 8118, a RealTime upgrade to make RT a complete storage abstraction. The store/destroy mechanisms needed these missing peices.
18 years ago
Steve Murphy d6943624c8 Merged revisions 59225 via svnmerge from
18 years ago
Olle Johansson 75d387acbc Doxygen additions, corrections
18 years ago
Olle Johansson 8ac0fb2bc3 New CLI command "Core show settings" to list some core settings
18 years ago
Joshua Colp 3388474e15 Merged revisions 53118 via svnmerge from
18 years ago
Joshua Colp 21b53af31d Cosmetic changes. Make main source files better conform to coding guidelines and standards. (issue #8679 reported by johann8384)
19 years ago
Russell Bryant a01ebfc13b Merged revisions 51057 via svnmerge from
19 years ago
Tilghman Lesher 836956f1df Bug 8803 - Fix crash in API
19 years ago
Joshua Colp 278f2fe4c1 Merged revisions 50405 via svnmerge from
19 years ago
Tilghman Lesher c4c2c546da When calling the Realtime app more than once, unset fields which were
19 years ago
Kevin P. Fleming d0f3b18d16 a little more const-ification
19 years ago
Kevin P. Fleming 87b9abc892 Merged revisions 49676 via svnmerge from
19 years ago
Joshua Colp 50d9c8ad07 Merged revisions 49551 via svnmerge from
19 years ago
Kevin P. Fleming 1c86ec8222 Merged revisions 47690 via svnmerge from
19 years ago
Kevin P. Fleming 00c5f6d032 Merged revisions 47684 via svnmerge from
19 years ago
Steve Murphy cd74836d3a This solves bug 8342, whereby a crash occurs under certain circumstances while reading a config file with comments-- a call to CB_ADD shouldn't happen if withcomments is zero
19 years ago
Tilghman Lesher 10875731ec Merged revisions 47051 via svnmerge from
19 years ago
Steve Murphy 1bb9f6b362 Cleanups suggested by Russell.
19 years ago
Mark Spencer b7517f1231 Fix comment preservation code (thanks murf!)
19 years ago
Tilghman Lesher 2b55678e1f Remove deprecated CLI apps from the core
19 years ago
Tilghman Lesher 70af28270d Constify the result of a config retrieval function, to avoid mutilation (issue 7983).
19 years ago
Matt O'Gorman d0a1a0033d similar patch for verbose vs debug with minor changes
19 years ago
Kevin P. Fleming fcb999c01c merge qwell's CLI verbification work
19 years ago
Kevin P. Fleming c2c4f86c72 merge markster's usersconf branch with some slight changes
19 years ago
Kevin P. Fleming 0a27d8bfe5 merge new_loader_completion branch, including (at least):
19 years ago