summaryrefslogtreecommitdiff
path: root/utils/check_expr.c
AgeCommit message (Collapse)Author
2016-10-27Remove ASTERISK_REGISTER_FILE.Corey Farrell
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes all traces of it. Previously exported symbols removed: * __ast_register_file * __ast_unregister_file * ast_complete_source_filename This also removes the mtx_prof static variable that was declared when MTX_PROFILE was enabled. This variable was only used in lock.c so it is now initialized in that file only. ASTERISK-26480 #close Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-09-29core: Remove ABI effects of LOW_MEMORY.Corey Farrell
This allows asterisk to compiled with LOW_MEMORY to load modules built without LOW_MEMORY. ASTERISK-26398 #close Change-Id: I24b78ac9493ab933b11087a8b6794f3c96d4872d
2016-08-19Fix naming mismatch of allocator functions.Corey Farrell
Allocator functions that take file/line/func parameters are prefixed with single-underscore when MALLOC_DEBUG is not defined, double-underscore when it is defined. This change updates all allocators that accept file/line/func to have the same prototype in either ABI mode. The parameter order of __ast_vasprintf and __ast_asprintf in utils.h have been changed to match that of astmm.h. End-use allocator macro's have been removed from astmm.h and moved to an unconditional part of utils.h. Change-Id: I823bb6ce2b5675b3a4735948f10a3b420e9a023a
2015-05-03utils: Remove trailing whitespaceRodrigo Ramírez Norambuena
Change-Id: I4644f43a6a1ca9b5130cd2a6746772b888eb4f7a
2015-04-13git migration: Refactor the ASTERISK_FILE_VERSION macroMatt Jordan
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2013-09-10Fixed utils directory breakage from r398748, this time with extra hate.David M. Lee
........ Merged revisions 398752 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 398753 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 398754 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10Fixed utils directory breakage from r398648David M. Lee
........ Merged revisions 398748 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 398749 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 398750 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13Make the utils directory compile... again.Matthew Jordan
Utils is a source folder that lies, eventually all developers will cry, "I know I must maintain it, But really with this last commit I can kiss my software ethics good-bye." git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-18Merged revisions 298960 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r298960 | tilghman | 2010-12-17 17:52:04 -0600 (Fri, 17 Dec 2010) | 20 lines Merged revisions 298957 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r298957 | tilghman | 2010-12-17 17:30:55 -0600 (Fri, 17 Dec 2010) | 13 lines Merged revisions 298905 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r298905 | tilghman | 2010-12-17 15:40:56 -0600 (Fri, 17 Dec 2010) | 6 lines Let Asterisk find better backtrace information with libbfd. The menuselect option BETTER_BACKTRACES, if enabled, will use libbfd to search for better symbol information within both the Asterisk binary, as well as loaded modules, to assist when using inline backtraces to track down problems. Review: https://reviewboard.asterisk.org/r/1055/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17A possibly "horrible fix" for a "horribly broken"Steve Murphy
situation. As stuff shifts around in the asterisk code, the miscellaneous inclusions from the standalone stuff gets broken. There's no easy fix for this situation. I made sure that everything in utils builds without problem ***AND*** that aelparse runs the regressions correctly with the following make menuselect options both on and off: DONT_OPTIMIZE DEBUG_THREADS DEBUG_CHANNEL_LOCKS MALLOC_DEBUG MTX_PROFILE DEBUG_SCHEDULER DEBUG_THREADLOCALS DETECT_DEADLOCKS CHANNEL_TRACE I think from now on, I'm going to #undef all these features in the various utils native files; I guess I could do the same for the copied-in files, surrounded by STANDALONE ifdef. A standalone isn't going to care about threads, mutexes, etc. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29incorporates r159808 from branches/1.4:Kevin P. Fleming
------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29Avoid build warning when execinfo.h isn't available.Sean Bright
(closes issue #12751) Reported by: ys Patches: check_expr.diff uploaded by ys (license 281) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-28Fix a linkage error related to the lock backtrace supportRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23A new feature thanks to the fine folks at Switchvox!Mark Michelson
If a deadlock is detected, then the typical lock information will be printed along with a backtrace of the stack for the offending threads. Use of this requires compiling with DETECT_DEADLOCKS and having glibc installed. Furthermore, issuing the "core show locks" CLI command will print the normal lock information as well as a backtraces for each lock. This requires that DEBUG_THREADS is enabled and that glibc is installed. All the backtrace features may be disabled by running the configure script with --without-execinfo as an argument git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10Merged revisions 114051 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114051 | mmichelson | 2008-04-10 15:59:49 -0500 (Thu, 10 Apr 2008) | 3 lines Fix 1.4 build when LOW_MEMORY is enabled. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Go through and fix a bunch of places where character strings were being ↵Terry Wilson
interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28Merged revisions 105116 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r105116 | russell | 2008-02-28 16:23:05 -0600 (Thu, 28 Feb 2008) | 8 lines Fix a bug in the lock tracking code that was discovered by mmichelson. The issue is that if the lock history array was full, then the functions to mark a lock as acquired or not would adjust the stats for whatever lock is at the end of the array, which may not be itself. So, do a sanity check to make sure that we're updating lock info for the proper lock. (This explains the bizarre stats on lock #63 in BE-396, thanks Mark!) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10Add ast_atomic_fetchadd_int_slow to check_expr for platforms that need it.Joshua Colp
(closes issue #11484) Reported by: snuffy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26closes issue #11341; made changes to make utils again right with the ↵Steve Murphy
MTX_PROFILE world. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21more header removal/normalizationLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17and then, I noticed the clicompat stuff.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17more stub routines to allow linkage in stand-alone environment, with thread ↵Steve Murphy
debugs turned on git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-09Remove redundant includes (patch by snuffy) (Closes issue #10922)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-08Fix up tree so that it compiles when MTX Profiling is enabled.Joshua Colp
(closes issue #10898) Reported by: snuffy Patches: 10898-mtx_prof.diff uploaded by qwell (license 4) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01OK. THis a DEBUG_THREADS situation.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01picky gcc versions... sigh.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01This mod will allow check_expr to compile in the presence of DEBUG_THREAD ↵Steve Murphy
situations. At least, it does for me. And it's less expensive than several other approaches I tried. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22Ensure that the object code for ast_atomic_fetchadd_int() gets included in theRussell Bryant
check_expr binary when building with LOW_MEMORY defined. (reported by Brian Capouch on the asterisk-dev list, patch by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15This commit closes bug 7605, and half-closes 7638. The AEL code has been ↵Steve Murphy
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. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵Steve Murphy
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05In regards to changes for 9508, expr2 system choking on floating point ↵Steve Murphy
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. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24Merged revisions 52052 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r52052 | murf | 2007-01-24 11:26:22 -0700 (Wed, 24 Jan 2007) | 9 lines Merged revisions 52002 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r52002 | murf | 2007-01-24 10:43:50 -0700 (Wed, 24 Jan 2007) | 1 line updated check_expr via 8322 (refactoring of expression checking impl); elfring contributed a nice code reorg, I contributed some time to get it working again, better messages ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-06check for failure after call to calloc() (issue #8295)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29remove extraneous svn:executable propertiesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14update MANY more files with proper copyright/license info (thanks Ian!)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-29don't make expression evaluator allocate a memory buffer for each resultKevin P. Fleming
to be returned; use the buffers already present in the PBX for this purpose update testexpr2/check_expr to allocate buffers for expression evaluation git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-21enhance check_expr to check for parsing errors in dialplans (bug #4556)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-09add tool to check extensions.conf files for problems with new expression ↵Kevin P. Fleming
parser (bug #4491) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5886 65c4cc65-6c06-0410-ace0-fbb531ad65f3