aboutsummaryrefslogtreecommitdiffstats
path: root/manager.c
AgeCommit message (Collapse)AuthorFilesLines
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-2630/+0
- 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: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-08Merge team/russell/ast_verbose_threadstoragerussell1-10/+18
- 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: http://svn.digium.com/svn/asterisk/trunk@39272 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-29Allow updates to match specific lines, allow specification of object or markster1-4/+9
no when appending. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38489 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-23various cleanups regarding coding guidelines issuesrussell1-25/+27
- 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: http://svn.digium.com/svn/asterisk/trunk@38088 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-21Merge a new implementation of ast_inet_ntoa, our thread safe replacement forrussell1-23/+16
inet_ntoa, which uses thread specific data (aka thread local storage) instead of stack allocatted buffers to store the result. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38042 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19First pass at in-place file manipulation via managermarkster1-3/+144
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37936 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-16malloc + memset to ast_callocrussell1-5/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37733 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-15oops?north1-2/+2
This should've been 5 chars.. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37669 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-04Bug 7472 - Change line terminator for header to be RFC-complianttilghman1-2/+7
Also, check to ensure the memory allocation didn't fail. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@36892 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-22Formatting fixesoej1-14/+12
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35502 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-4/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-20- add a UserEvent action that allows a manager client to "broadcast" an eventrussell1-0/+26
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: http://svn.digium.com/svn/asterisk/trunk@29017 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-19As requested by kpfleming, renaming messagecount to inboxcount and ↵tilghman1-1/+1
messagecount2 to messagecount. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@28745 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-11- Use systemname for realm in sip, if we have no configuration for realmoej1-0/+9
- Optionally send systemname in manager (cool when you have a manager proxy) - Use systemname in CLI prompt git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26884 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-10remove almost all of the checks of the result from ast_strdupa() or alloca().russell1-2/+1
As it turns out, all of these checks were useless, because alloca will never return NULL. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26451 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-09Bug 7114 - Originate success/failure indicator was reversedtilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25831 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-05move ast_carefulwrite from manager.c to utils.c so that cli.c andrussell1-32/+0
res_agi.c no longer depend on manager.h (issue #6397, casper) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25026 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-29a bunch of conversion to ast_channel_*lock (issue #7058)russell1-8/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23355 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-21more NULL and "" equivalence in cid fieldsrizzo1-9/+9
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21816 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-11Bug 6943 - transition away from using CallerID header, when we really mean ↵tilghman1-3/+9
CallerIDNum git-svn-id: http://svn.digium.com/svn/asterisk/trunk@19436 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) ↵tilghman1-1/+1
rand() to threadsafe ast_random() git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17627 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04Issue #6884 - manager.c formatting (casper)oej1-51/+53
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17389 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-03- Doxygen additionsoej1-21/+26
- Formatting fixes (read guidelines :-) ) - Removing compilation warnings git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17105 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-03Bug 6861 - Routine should use the specified writetimeout, rather than the ↵tilghman1-1/+1
default git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17029 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-03Bug 6862 - No need to initialize memory to zero twicetilghman1-4/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17028 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-02Minor cleanup in wakeup logicmarkster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16975 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-02Unify manager behind a single event queuemarkster1-71/+171
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16957 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-01Make excessive debug optionalmarkster1-3/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16903 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-01Flesh out the remainder of the manager + http changes and create a sample ↵markster1-16/+560
application to partially demonstrate the capability of manager over http. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16850 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-28more command completion normalization.rizzo1-20/+17
also change some explicit constant with sizeof() git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15859 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-26conversions to S_OR (issue #6803)russell1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15022 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-25Add micro-http server and abstract manager interface, make snmp not die markster1-28/+78
on reload. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14953 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-12major dialplan functions updatekpfleming1-1/+1
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL() git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9674 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-11Merged revisions 9581 via svnmerge from russell1-20/+16
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: http://svn.digium.com/svn/asterisk/trunk@9582 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-23code clean up and macro implementation from mogorman1-8/+12
bug 6247 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8505 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-18constify arguments in more places where strings should not be modified ↵russell1-1/+1
(issue #6286) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8203 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-17remove some more deprecated (pre-1.2) stuffkpfleming1-6/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8157 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-17Portability - compilation warning on Mac OS/X removedoej1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8138 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-15Prepare for removal of DBGet/DBPut manager commands, by allowing Getvar to ↵tilghman1-1/+5
get functions (Setvar can already set functions) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8078 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-08Remove unnecessary unlock (bug #6171)markster1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7868 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-07Bug 6162 - Constify manager_event argumentstilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7853 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-03update copyright headers for files changed this yearkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7751 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-03add optional timestamps to manager events (issue #5535, simplified)kpfleming1-5/+14
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7750 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-03Bug #5228: Add caller ID and CallerIDname to OriginateSuccess/Failure ↵oej1-20/+17
manager events (outtolunc) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7732 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-30update doxygen docs to specify authorsrussell1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7682 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-27Bug 4880 - add priority label matching and dialplan function retrievaltilghman1-18/+19
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7658 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-03Bug 5858 - Make the chanvars.c functions return a 'const char *'tilghman1-1/+1
This should prevent us from unintentionally changing variable values when they're returned from pbx_builtin_getvar_helper. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7304 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-15don't crash on setvar (issue #5760)russell1-3/+10
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7099 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-15Issue #5737twisted1-2/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7097 f38db490-d61c-443f-a65b-d21fe96a405b