aboutsummaryrefslogtreecommitdiffstats
path: root/main/taskprocessor.c
AgeCommit message (Collapse)AuthorFilesLines
2009-05-21Const-ify the world (or at least a good part of it)kpfleming1-4/+4
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-01Merge changes from str_substitution that are unrelated to that branch.tilghman1-3/+3
Included is a small bugfix to an ast_str helper, but most of these changes are simply doxygen fixes. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@185912 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13correct a CLI descriptiondhubbard1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168539 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25This is basically a complete rollback of r155401, as it was determined thatseanbright1-3/+3
it would be best to maintain API compatibility. Instead, this commit introduces ao2_callback_data() which is functionally identical to ao2_callback() except that it allows you to pass arbitrary data to the callback. Reviewed by Mark Michelson via ReviewBoard: http://reviewboard.digium.com/r/64 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158959 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-15Fix a few more places where the case insensitive hash should be used sincerussell1-1/+1
the comparison is case insensitive. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157041 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07Add ability to pass arbitrary data to the ao2_callback_fn (called fromseanbright1-3/+3
ao2_callback and ao2_find). Currently, passing OBJ_POINTER to either of these mandates that the passed 'arg' is a hashable object, making searching for an ao2 object based on outside criteria difficult. Reviewed by Russell and Mark M. via ReviewBoard: http://reviewboard.digium.com/r/36/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155401 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-28Merge the cli_cleanup branch.mvanbaak1-2/+2
This work is done by lmadsen, junky and mvanbaak during AstriDevCon. This is the second audit the CLI got, and this time lmadsen made sure he had _ALL_ modules loaded that have CLI commands in them. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145121 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-29Merged revisions 140488 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines After working on the ao2_containers branch, I noticed something a bit strange. In all cases where we provide a callback function to ao2_container_alloc, the callback function would only return 0 or CMP_MATCH. After inspecting the ao2_callback() code carefully, I found that if you're only looking for one specific item, then you should return CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue traversing the current bucket until the end searching for more matches. In cases like chan_iax2 where in 1.4, all the peers are shoved into a single bucket, this makes for potentially terrible performance since the entire bucket will be traversed even if the peer is one of the first ones come across in the bucket. All the changes I have made were for cases where the callback function defined was passed to ao2_container_alloc so that calls to ao2_find could find a unique instance of whatever object was being stored in the container. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140489 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10That's all, folks. Not going to update the Makefile until res_jabber isseanbright1-4/+4
converted (snuffy, you there? :)) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137110 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-06move taskprocessor CLI commands into the core namespacedhubbard1-9/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136245 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-23make solaris happy...pointed out by snuff-home on IRCdhubbard1-8/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@124707 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-10Properly initialize the cli_ping condition and lockrussell1-1/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121402 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-10Change system header includes to be like how it is done in other filesrussell1-2/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121401 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-09Initialize the lock and destroy lock and cond in the destructor (thanks, ↵twilson1-1/+6
mmichelson) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121365 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-29Had to move the ASTERISK_FILE_VERSION decl to just after the include of ↵murf1-1/+2
"asterisk.h" or you get undefined variable errors when you are compiling under the influence of MTX_PROFILE git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119074 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-15Use casts or intermediate variables to remove a numberrizzo1-1/+1
of platform/compiler-dependent warnings when handing struct timeval fields, both reading and printing them. It is a lost battle to handle the different ways struct timeval is handled on the various platforms and compilers, so try to be pragmatic and go through int/long which are universally supported. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@116557 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-03A taskprocessor is an object that has a name, a task queue, and an event ↵dhubbard1-0/+490
processing thread. Modules reference a taskprocessor, push tasks into the taskprocessor as needed, and unreference the taskprocessor when the taskprocessor is no longer needed. A task wraps a callback function pointer and a data pointer and is managed internal to the taskprocessor subsystem. The callback function is responsible for releasing task data. Taskprocessor API * ast_taskprocessor_get(..) - returns a reference to a taskprocessor * ast_taskprocessor_unreference(..) - releases reference to a taskprocessor * ast_taskprocessor_push(..) - push a task into a taskprocessor queue Check doxygen for more details git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115268 f38db490-d61c-443f-a65b-d21fe96a405b