summaryrefslogtreecommitdiff
path: root/utils/astman.c
AgeCommit message (Collapse)Author
2017-08-01Fix compiler warnings on Fedora 26 / GCC 7.Corey Farrell
GCC 7 has added capability to produce warnings, this fixes most of those warnings. The specific warnings are disabled in a few places: * app_voicemail.c: truncation of paths more than 4096 chars in many places. * chan_mgcp.c: callid truncated to 80 chars. * cdr.c: two userfields are combined to cdr copy, fix would break ABI. * tcptls.c: ignore use of deprecated method SSLv3_client_method(). ASTERISK-27156 #close Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
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
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
2014-12-17Fix printf problems with high ascii characters after r413586 (1.8).Walter Doekes
In r413586 (1.8) various casts were added to silence gcc 4.10 warnings. Those fixes included things like: -out += sprintf(out, "%%%02X", (unsigned char) *ptr); +out += sprintf(out, "%%%02X", (unsigned) *ptr); That works for low ascii characters, but for the high range that yields e.g. FFFFFFC3 when C3 is expected. This changeset: - fixes those casts to use the 'hh' unsigned char modifier instead - consistently uses %02x instead of %2.2x (or other non-standard usage) - adds a few 'h' modifiers in various places - fixes a 'replcaes' typo - dev/urandon typo (in 13+ patch) Review: https://reviewboard.asterisk.org/r/4263/ ASTERISK-24619 #close Reported by: Stefan27 (on IRC) ........ Merged revisions 429673 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429674 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 429675 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27Fix memory stomping bug in astman.David M. Lee
This memset complained in dev mod on my Ubuntu box. The memset is both unnecessary and dangerous. At this point, m hasn't been initialized yet, so the memset will write off to whatever address happens to be on the stack at the time. ........ Merged revisions 409077 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 409083 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409087 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Fixed warning in astman for gcc-4.8.David M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14Fix incorrect sizeof() in astman.Russell Bryant
........ Merged revisions 359116 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359117 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08Avoid cppcheck warnings; removing unused vars and a bit of cleanup.Walter Doekes
Patch by: Clod Patry Review: https://reviewboard.asterisk.org/r/1651 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 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
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-11-02bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 ↵Kevin P. Fleming
branch, and add the ones needed for all the new code here too git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27Merged revisions 144924-144925 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r144924 | kpfleming | 2008-09-27 10:00:48 -0500 (Sat, 27 Sep 2008) | 6 lines improve header inclusion process in a few small ways: - it is no longer necessary to forcibly include asterisk/autoconfig.h; every module already includes asterisk.h as its first header (even before system headers), which serves the same purpose - astmm.h is now included by asterisk.h when needed, instead of being forced by the Makefile; this means external modules will build properly against installed headers with MALLOC_DEBUG enabled - simplify the usage of some of these headers in the AEL-related stuff in the utils directory ........ r144925 | kpfleming | 2008-09-27 10:13:30 -0500 (Sat, 27 Sep 2008) | 2 lines fix some minor issues with rev 144924 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07More merges from resolve-shadow warnings:Sean Bright
utils/ codecs/ and a change I missed from formats/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11Fix trunk breakageTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11Janitor patch to change uses of sizeof to ARRAY_LENBrett Bryant
(closes issue #13054) Reported by: pabelanger Patches: ARRAY_LEN.patch2 uploaded by pabelanger (license 224) Tested by: seanbright git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 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-21Ignore some more unused generated events.Tilghman Lesher
(closes issue #12042) Reported by: junky Patches: astman_events.diff uploaded by junky (license 177) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10The fixes in this commit are mainly to allow compiling of trunk with ↵Steve Murphy
--enable-dev-mode, mutex profiling, lock debugging, etc. Mainly, the version.c needs to be in the OBJS line; asterisk.h was chosen to have the prototypes for ast_get_version, ast_get_version_num; and the ASTERISK_FILE_VERSION macro needs to be used after including asterisk.h in a few files. I hope I did the right thing. If not, let me know. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04Fix the build of astman. Any file that includes any asterisk sub-headersRussell Bryant
needs to first include asterisk.h. (closes issue #11394) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08improve linked-list macros in two ways:Kevin P. Fleming
- the *_CURRENT macros no longer need the list head pointer argument - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 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-01-05Merged revisions 49676 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49676 | kpfleming | 2007-01-05 16:16:33 -0600 (Fri, 05 Jan 2007) | 2 lines reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most cases ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18Merged revisions 48554 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r48554 | kpfleming | 2006-12-18 05:59:24 -0600 (Mon, 18 Dec 2006) | 3 lines remove some now-unnecessary explicit includes of autoconfig.h clean up per-file dependencies during 'make clean' ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-06Add support for manager hooks, so you could fire off manager events over IRC ↵Joshua Colp
if you were crazy enough. (issue #5161 reported by anthm with mods by moi) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30These changes submitted by moy via bug 6992, to add a Dial 'End' event to ↵Steve Murphy
asterisk. I include some changes to astman to cover other events that have been added. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19astman was slightly weirding out over the new Dial and Newcallerid eventsSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07move autoconfig.h to the include/asterisk directory so it will get installedKevin P. Fleming
install asterisk.h include the system's default include directory git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵Kevin P. Fleming
again :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12add 'show threads' and 'show profile' commands.Luigi Rizzo
These are momstly debugging tools for developers, a bit documented in the header files (utils.h), although more documentation is definitely necessary. The performance impact is close to zero(*) so there is no need to compile it conditionally. (*) not completely true - thread destruction still needs to search a list _but_ this can be easily optimized if we end up with hundreds of active threads (in which case, though, the problem is clearly elsewhere). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29Update to code documentation and developer guidelines.Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25don't leak almost 200 bytes for each new channel and store the activeRussell Bryant
channel list using the linked list macros (issue #6330) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-11Merged revisions 7404,7406,7425,7427,7429-7430 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7404 | tilghman | 2005-12-08 18:32:08 -0500 (Thu, 08 Dec 2005) | 2 lines Documenting two keywords that were previously missing ........ r7406 | tilghman | 2005-12-08 18:45:36 -0500 (Thu, 08 Dec 2005) | 2 lines Bug 5960 ........ r7425 | bweschke | 2005-12-10 13:10:50 -0500 (Sat, 10 Dec 2005) | 4 lines Bug #5877 Make sure the digit string from E&M wink DNIS collection is properly null terminated as it grows. ........ r7427 | tilghman | 2005-12-10 20:15:15 -0500 (Sat, 10 Dec 2005) | 2 lines Bug 5967 ........ r7429 | tilghman | 2005-12-10 20:26:51 -0500 (Sat, 10 Dec 2005) | 2 lines Bug 5965 - major bug in AST_LIST_REMOVE ........ r7430 | russell | 2005-12-11 01:08:56 -0500 (Sun, 11 Dec 2005) | 2 lines silence a couple of compiler warnings about pointer signedness ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7431 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-06-07fix astman buildKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-05-28hopefully the last commit to make things happyRussell Bryant
across various versions of newt (bug #4388) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-05-26fix usage of const char (bug #4388)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-05-24get rid of some compilation warningsRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-21use double-quotes instead of angle-brackets for non-system include files ↵Kevin P. Fleming
(bug #4058) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-03fix various compiler warnings (bug #3938)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-24Fix astman build on FreeBSD (bug #2119)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14Merge remaining audit patch (save dlfcn.c)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-08Update default astman types for newer newt (bug #1578)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-22gethostbyname isn't reentrant, who knew...Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-15Make astman ignore 'StatusComplete' events.James Golovich
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-11-23Various warning cleanupsMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-09-19Code cleanups (bug #66)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1531 65c4cc65-6c06-0410-ace0-fbb531ad65f3