summaryrefslogtreecommitdiff
path: root/manager.c
AgeCommit message (Collapse)Author
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08Merge team/russell/ast_verbose_threadstorageRussell Bryant
- instead of defining a free() wrapper in a bunch of files, define it as ast_free() in utils.h and remove the copies from all the files. - centralize and abstract the code used for doing thread storage. The code lives in threadstorage.h, with one function being implemented in utils.c. This new API includes generic thread storage as well as special functions for handling thread local dynamic length string buffers. - update ast_inet_ntoa() to use the new threadstorage API - update ast_state2str() to use the new threadstorage API - update ast_cli() to use the new threadstorage API - Modify manager_event() to use thread storage. Instead of using a buffer of 4096 characters as the workspace for building the manager event, use a thread local dynamic string. Now there is no length limitation on the length of the body of a manager event. - Significantly simplify the handling of ast_verbose() ... - Instead of using a static char buffer and a lock to make sure only one thread can be using ast_verbose() at a time, use a thread local dynamic string as the workspace for preparing the verbose message. Instead of locking around the entire function, the only locking done now is when the message has been built and is being deliviered to the list of registered verbose message handlers. - This function was doing a strdup() on every message passed to it and keeping a queue of the last 200 messages in memory. This has been completely removed. The only place this was used was that if there were any messages in the verbose queue when a verbose handler was registered, all of the messages in the queue would be fed to it. So, I just made sure that the console verbose handler and the network verbose handler (for remote asterisk consoles) were registered before any verbose messages. pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at startup, but I didn't feel the performance hit of this message queue was worth saving the initial verbose output for these very rarely used modules. - I have removed the last three arguments to the verbose handlers, leaving only the string itself because they aren't needed anymore. For example, ast_verbose had some logic for telling the verbose handler to add a newline if the buffer was completely full. Now that the buffer can grow as needed, this doesn't matter anymore. - remove unused function, ast_verbose_dmesg() which was to dispatch the message queue - Convert the list of verbose handlers to use the linked list macros. - add missing newline characters to a few ast_verbose() calls - convert the list of log channels to use the linked list macros in logger.c - fix close_logger() to close all of the files it opened for logging - update ast_log() to use a thread local dynamic string for its workspace for preparing log messages instead of a buffer of size BUFSIZ (8kB on my system) allocated on the stack. The dynamic string in this case is limited to only growing to a maximum size of BUFSIZ. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-29Allow updates to match specific lines, allow specification of object or Mark Spencer
no when appending. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-23various cleanups regarding coding guidelines issuesRussell Bryant
- malloc to ast_malloc - malloc + memset to ast_calloc - sizeof(struct foo) to sizeof(*bar) - remove indentation of the entire body of a function by returning immediately on an allocation failure (issue #7581, tempest1) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21Merge a new implementation of ast_inet_ntoa, our thread safe replacement forRussell Bryant
inet_ntoa, which uses thread specific data (aka thread local storage) instead of stack allocatted buffers to store the result. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19First pass at in-place file manipulation via managerMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-16malloc + memset to ast_callocRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15oops?North Antara
This should've been 5 chars.. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-04Bug 7472 - Change line terminator for header to be RFC-compliantTilghman Lesher
Also, check to ensure the memory allocation didn't fail. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22Formatting fixesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35502 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-05-20- add a UserEvent action that allows a manager client to "broadcast" an eventRussell Bryant
to all connected manager clients - update the UserEvent application to use the application argument parsing macros and to allow headers to be specified as pipe delimeted arguments (issue #5324, original patch by outtolunc, committed patch by Corydon) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19As requested by kpfleming, renaming messagecount to inboxcount and ↵Tilghman Lesher
messagecount2 to messagecount. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11- Use systemname for realm in sip, if we have no configuration for realmOlle Johansson
- Optionally send systemname in manager (cool when you have a manager proxy) - Use systemname in CLI prompt git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10remove almost all of the checks of the result from ast_strdupa() or alloca().Russell Bryant
As it turns out, all of these checks were useless, because alloca will never return NULL. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09Bug 7114 - Originate success/failure indicator was reversedTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05move ast_carefulwrite from manager.c to utils.c so that cli.c andRussell Bryant
res_agi.c no longer depend on manager.h (issue #6397, casper) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29a bunch of conversion to ast_channel_*lock (issue #7058)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21more NULL and "" equivalence in cid fieldsLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11Bug 6943 - transition away from using CallerID header, when we really mean ↵Tilghman Lesher
CallerIDNum git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) ↵Tilghman Lesher
rand() to threadsafe ast_random() git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04Issue #6884 - manager.c formatting (casper)Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03- Doxygen additionsOlle Johansson
- Formatting fixes (read guidelines :-) ) - Removing compilation warnings git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03Bug 6861 - Routine should use the specified writetimeout, rather than the ↵Tilghman Lesher
default git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03Bug 6862 - No need to initialize memory to zero twiceTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-02Minor cleanup in wakeup logicMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-02Unify manager behind a single event queueMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-01Make excessive debug optionalMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-01Flesh out the remainder of the manager + http changes and create a sample ↵Mark Spencer
application to partially demonstrate the capability of manager over http. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28more command completion normalization.Luigi Rizzo
also change some explicit constant with sizeof() git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-26conversions to S_OR (issue #6803)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25Add micro-http server and abstract manager interface, make snmp not die Mark Spencer
on reload. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12major dialplan functions updateKevin P. Fleming
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL() git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11Merged revisions 9581 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r9581 | russell | 2006-02-11 13:15:00 -0500 (Sat, 11 Feb 2006) | 2 lines now that CDR is a loadable module, don't depend on it elsewhere (issue #6460) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-23code clean up and macro implementation from Matt O'Gorman
bug 6247 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18constify arguments in more places where strings should not be modified ↵Russell Bryant
(issue #6286) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17remove some more deprecated (pre-1.2) stuffKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17Portability - compilation warning on Mac OS/X removedOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-15Prepare for removal of DBGet/DBPut manager commands, by allowing Getvar to ↵Tilghman Lesher
get functions (Setvar can already set functions) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-08Remove unnecessary unlock (bug #6171)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07Bug 6162 - Constify manager_event argumentsTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03update copyright headers for files changed this yearKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03add optional timestamps to manager events (issue #5535, simplified)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03Bug #5228: Add caller ID and CallerIDname to OriginateSuccess/Failure ↵Olle Johansson
manager events (outtolunc) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30update doxygen docs to specify authorsRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27Bug 4880 - add priority label matching and dialplan function retrievalTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-03Bug 5858 - Make the chanvars.c functions return a 'const char *'Tilghman Lesher
This should prevent us from unintentionally changing variable values when they're returned from pbx_builtin_getvar_helper. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7304 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-11-15don't crash on setvar (issue #5760)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-15Issue #5737Josh Roberson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7097 65c4cc65-6c06-0410-ace0-fbb531ad65f3