Commit Graph

19 Commits

Author SHA1 Message Date
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

Review: https://reviewboard.asterisk.org/r/1071/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:55:39 +00:00
Russell Bryant 5665aa361f Minor tweaks to comment blocks and includes.
Fix the copyright lines, tweak doxygen formatting, and remove some unnecessary
includes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@248226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-22 06:45:52 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
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: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Tilghman Lesher be40f3a33c Merge changes from str_substitution that are unrelated to that branch.
Included is a small bugfix to an ast_str helper, but most of these changes
are simply doxygen fixes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 20:13:28 +00:00
Dwayne M. Hubbard 90f50f99df correct a CLI description
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 16:02:13 +00:00
Sean Bright fd8caa1778 This is basically a complete rollback of r155401, as it was determined that
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: https://origsvn.digium.com/svn/asterisk/trunk@158959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 01:01:49 +00:00
Russell Bryant 1148e648b8 Fix a few more places where the case insensitive hash should be used since
the comparison is case insensitive.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-15 04:25:57 +00:00
Sean Bright 30d1744ffc Add ability to pass arbitrary data to the ao2_callback_fn (called from
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: https://origsvn.digium.com/svn/asterisk/trunk@155401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 22:39:30 +00:00
Michiel van Baak 90751b16ca Merge the cli_cleanup branch.
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: https://origsvn.digium.com/svn/asterisk/trunk@145121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-28 23:32:14 +00:00
Mark Michelson 5dfefa5ee6 Merged revisions 140488 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@140489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29 17:47:17 +00:00
Sean Bright 74bf61579f That's all, folks. Not going to update the Makefile until res_jabber is
converted (snuffy, you there? :))


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10 20:57:25 +00:00
Dwayne M. Hubbard 367dfcb0ab move taskprocessor CLI commands into the core namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-06 21:22:56 +00:00
Dwayne M. Hubbard 468ae8efcb make solaris happy...pointed out by snuff-home on IRC
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-23 15:24:05 +00:00
Russell Bryant a886b6e5e6 Properly initialize the cli_ping condition and lock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 00:31:30 +00:00
Russell Bryant c94c4f5572 Change system header includes to be like how it is done in other files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 00:29:01 +00:00
Terry Wilson a6a6821717 Initialize the lock and destroy lock and cond in the destructor (thanks, mmichelson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 22:42:08 +00:00
Steve Murphy 9107547668 Had to move the ASTERISK_FILE_VERSION decl to just after the include of "asterisk.h"
or you get undefined variable errors when you are compiling under the influence
of MTX_PROFILE



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 20:26:42 +00:00
Luigi Rizzo 18065a175d Use casts or intermediate variables to remove a number
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: https://origsvn.digium.com/svn/asterisk/trunk@116557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-15 10:56:29 +00:00
Dwayne M. Hubbard b0b72e89a8 A taskprocessor is an object that has a name, a task queue, and an event 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: https://origsvn.digium.com/svn/asterisk/trunk@115268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-03 03:40:32 +00:00