summaryrefslogtreecommitdiff
path: root/include/asterisk
AgeCommit message (Collapse)Author
2013-02-28threadpool: Whitespace and comment corrections.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19Add The Status Of A Module To The Output Of "CLI> module show"Michael L. Young
When a module's configuration is not loadable, we still load the module but it is not in a running state. When trying to troubleshoot, let's say, why chan_motif is ignoring inbound XMPP traffic, there is no way to indicate that a loaded module is not currently running. (closes issue ASTERISK-21108) Reported by: Rusty Newton Tested by: Michael L. Young Patches: asterisk-21108_add_status-v2.diff Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2331/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-16Add support for retrieving multiple objects from sorcery using a regex on ↵Joshua Colp
their id. Review: https://reviewboard.asterisk.org/r/2329/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Disable strict XML documentation config checking; fix crash caused by sorceryMatthew Jordan
This patch does two things: 1. It disables (temporarily) strict XML documentation checking for module configurations. We should re-enable it before making any release from trunk. 2. Pass the module flag AST_MODULE through sorcery. This means several of the API calls are now macros and will do this automatically for you. The config framework needs the module that objects are registering to so it can properly construct the documentation. (This was already a required field, but sorcery was getting by without it) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Stopped spamming of debug messages during attended transfer.Kevin Harwell
While autoservice is running and servicing a channel the callid is being stored and removed in the thread's local storage for each iteration of the thread loop. If debug was set to a sufficient level the log file would be spammed with callid thread local storage debug messages. Added a new function that checks to see if the callid to be stored is different than what is already contained (if anything). If it is different then store/replace and log, otherwise just leave as is. Also made it so all logging of debug messages pertaining to the callid thread storage outputs only when TEST_FRAMEWORK is defined. (issue ASTERISK-21014) (closes issue ASTERISK-21014) Report by: Rusty Newton Review: https://reviewboard.asterisk.org/r/2324/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Add CLI configuration documentationMatthew Jordan
This patch allows a module to define its configuration in XML in source, such that it can be parsed by the XML documentation engine. Documentation is generated in a two-pass approach: 1. The documentation is first generated from the XML pulled from the source 2. The documentation is then enhanced by the registration of configuration options that use the configuration framework This patch include configuration documentation for the following modules: * chan_motif * res_xmpp * app_confbridge * app_skel * udptl Two new CLI commands have been added: * config show help - show configuration help by module, category, and item * xmldoc dump - dump the in-memory representation of the XML documentation to a new XML file. Review: https://reviewboard.asterisk.org/r/2278 Review: https://reviewboard.asterisk.org/r/2058 patches: on review 2058 uploaded by twilson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Revamp of terminal color codesKinsey Moore
The core module related to coloring terminal output was old and needed some love. The main thing here was an attempt to get rid of the obscene number of stack-local buffers that were allocated for no other reason than to colorize some output. Instead, this uses a simple trick to allocate several buffers within threadlocal storage, then automatically rotates between them, so that you can make multiple calls to the colorization routine within one function and not need to allocate multiple buffers. Review: https://reviewboard.asterisk.org/r/2241/ Patches: bug.patch uploaded by Tilghman Lesher git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Update the name of the update_tags utility in the git mirror how-to.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-12Add a serializer interface to the threadpoolDavid M. Lee
This patch adds the ability to create a serializer from a thread pool. A serializer is a ast_taskprocessor with the same contract as a default taskprocessor (tasks execute serially) except instead of executing out of a dedicated thread, execution occurs in a thread from a ast_threadpool. Think of it as a lightweight thread. While it guarantees that each task will complete before executing the next, there is no guarantee as to which thread from the pool individual tasks will execute. This normally only matters if your code relys on thread specific information, such as thread locals. This patch also fixes a bug in how the 'was_empty' parameter is computed for the push callback, and gets rid of the unused 'shutting_down' field. Review: https://reviewboard.asterisk.org/r/2323/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11Fix compilation error with REF_DEBUGKinsey Moore
When the red/black tree work was committed, there was an extra ", " in the REF_DEBUG definition of ao2_container_alloc_rbtree. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-10Add additional functionality to the Sorcery API.Joshua Colp
This commit adds native implementation support for copying and diffing objects, as well as the ability to load or reload on a per-object type level. Review: https://reviewboard.asterisk.org/r/2320/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-09Make ast_do_masquerade() a void function.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-07Add aggregate operations for stuctures with string fieldsKinsey Moore
Add struct-level comparison and copying of string fields to reduce the complexity of whole-struct comparison and copying when using string fields. The new macros do not take into account non-stringfield data. Review: https://reviewboard.asterisk.org/r/2308/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31Eliminate an unused lock in ast_bridge_channel.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31Make CHECK_BLOCKING() debug message more useful.Richard Mudgett
Change the displayed pthread value to hex format so it can be easily matched with CLI core show threads or gdb. ........ Merged revisions 380611 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380612 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29Update configure script to be compatible with ptlib 2.10.9Matthew Jordan
With ptlib 2.10.9, the configure script fails due to grep returning multiple matches for the pattern it searches for. This patch updates the pattern matching to return only the actual version for the symbol searched for, PTLIB_VERSION. (closes issue ASTERISK-20980) Reported by: Stefan Reuter patches: ASTERISK-20980-1.patch uploaded by Stefan Reuter (license 5339) ........ Merged revisions 380297 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380298 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25Merge the sorcery data access layer API.Joshua Colp
Sorcery is a unifying data access layer which provides a pluggable mechanism to allow object creation, retrieval, updating, and deletion using different backends (or wizards). This is a fancy way of saying "one interface to rule them all" where them is configuration, realtime, and anything else that comes along. Review: https://reviewboard.asterisk.org/r/2259/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22Add ControlPlayback manager actionMatthew Jordan
This patch adds the capability for asynchronous manipulation of audio being played back to a channel though a new AMI action "ControlPlayback". The ControlPlayback action supports a number of operations, the availability of which depend on the application being used to send audio to the channel. When the audio playback was initiated using the ControlPlayback application or CONTROL STREAM FILE AGI command, the audio can be paused, stopped, restarted, reversed, or skipped forward. When initiated by other mechanisms (such as the Playback application), the audio can be stopped, reversed, or skipped forward. Review: https://reviewboard.asterisk.org/r/2265/ (closes issue ASTERISK-20882) Reported by: mjordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21Made some bridging API calls void. Some bridging comments updated.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21Bridge API comment tweaks.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-19Add builtin roundf() for systems lacking it.Walter Doekes
(closes issue ASTERISK-16854) Review: https://reviewboard.asterisk.org/r/2276 Reported-by: Ovidiu Sas ........ Merged revisions 379547 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379548 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-17Address David's latest feedback on reviewboard:Mark Michelson
* Add a max_size option for threadpools. Also added a test for this option. * Fixed comments to be more accurate and have fewer typos. * Updated copyright dates on new files. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-15Add doxygen to accessors and increase refcount of taskprocessor before ↵Mark Michelson
returning. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-15Make the threadpool listener opaque.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-15Make ast_taskprocessor_listener opaque.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-15Address further review feedback from David Lee.Mark Michelson
* Clarify some documentation * Change copyright date of taskprocessor files * Address potential issue of creating taskprocessor with listener if taskprocessor with that name exists already git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-15Make the initial size of the threadpool part of the options passed in.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-15Remove threadpool listener alloc and destroy callbacks.Mark Michelson
This replaces the destroy callback with a shutdown callback instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-15Remove alloc and destroy callbacks from the taskprocessor.Mark Michelson
Now user data is allocated by the creator of the taskprocessor listener and that user data is passed into ast_taskprocessor_listener_alloc(). Similarly, freeing of the user data is left up to the user himself. He can free the data when the taskprocessor shuts down, or he can choose to hold onto it if it makes sense to do so. This, unsurprisingly, makes threadpool allocation a LOT cleaner now. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-14Merged revisions 379070 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ........ r379070 | dlee | 2013-01-14 15:47:31 -0600 (Mon, 14 Jan 2013) | 1 line Fixed doc comment for ast_test_validate ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-14Merged revisions 379021,379023 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ................ r379021 | dlee | 2013-01-14 09:29:22 -0600 (Mon, 14 Jan 2013) | 15 lines Fix XML encoding of 'identity display' in NOTIFY messages, continued. When r378933 was merged into 1.8, it should have also escaped remote_display, since it will have the same XML encoding problem when the caller/callee roles are reversed. (closes issue ABE-2902) Reported by: Guenther Kelleter ........ Merged revisions 379001 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379020 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ r379023 | dlee | 2013-01-14 09:58:01 -0600 (Mon, 14 Jan 2013) | 20 lines Masquerades are an insane implementation detail within Asterisk. It generates a number of useless and confusing events, and manipulates channels in a way that semantically doesn't make sense. I've given a fairly thorough review of masquerade code and its usage on the wiki at https://wiki.asterisk.org/wiki/x/IwBRAQ. While ultimately it makes the most sense to abandon masquerades altogether, it will take some time to completely irradicate. Even then, there may always be code that's not worth rewriting to get rid of the masquerade. This patch does two things to make masquerades slightly less insane: * When swapping the names of the original and clone channel, only emit a single rename event of original -> original<ZOMBIE>. The original code issued three rename events to accomplish the same end. * In addition to swapping the names of the channels, also swap their uniqueid's. This allows the 'Uniqueid' field to be used as a stable identifier for a channel from and external interface, such as AMI. Review: https://reviewboard.asterisk.org/r/2266/ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-12Merged revisions 378935 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ................ r378935 | dlee | 2013-01-12 00:43:37 -0600 (Sat, 12 Jan 2013) | 41 lines Fix XML encoding of 'identity display' in NOTIFY messages. XML encoding in chan_sip is accomplished by naively building the XML directly from strings. While this usually works, it fails to take into account escaping the reserved characters in XML. This patch adds an 'ast_xml_escape' function, which works similarly to 'ast_uri_encode'. This is used to properly escape the local_display attribute in XML formatted NOTIFY messages. Several things to note: * The Right Thing(TM) to do would probably be to replace the ast_build_string stuff with building an ast_xml_doc. That's a much bigger change, and out of scope for the original ticket, so I refrained myself. * It is with great sadness that I wrote my own ast_xml_escape function. There's one in libxml2, but it's knee-deep in libxml2-ness, and not easily used to one-off escape a string. * I only escaped the string we know is causing problems (local_display). At least some of the other strings are URI-encoded, which should be XML safe. Rather than figuring out what's safe and escaping what's not, it would be much cleaner to simply build an ast_xml_doc for the messages and let the XML library do the XML escaping. Like I said, that's out of scope. (closes issue ABE-2902) Reported by: Guenther Kelleter Tested by: Guenther Kelleter Review: http://reviewboard.digium.internal/r/365/ ........ Merged revision 378919 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier ........ Merged revisions 378933 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378934 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-11Merged revisions 378915,378918 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ................ r378915 | dlee | 2013-01-11 16:31:42 -0600 (Fri, 11 Jan 2013) | 21 lines Add JSON API for Asterisk. This provides a JSON API by pulling in and wrapping the Jansson JSON library[1]. The Asterisk API basically mirrors the Jansson functionality, with a few minor tweaks. * Some names have been asteriskified to protect the innocent. * Jansson provides both reference-stealing and reference-borrowing versions of several API's. The Asterisk API is exclusively reference-stealing for operations that put elements into arrays and objects. * No support for doubles, since we usually don't need that. * Coming along for the ride is the ast_test_validate macro, which made the unit tests much easier to write. [1]: http://www.digip.org/jansson/ (issue ASTERISK-20887) (closes issue ASTERISK-20888) Review: https://reviewboard.asterisk.org/r/2264/ ................ r378918 | file | 2013-01-11 17:05:38 -0600 (Fri, 11 Jan 2013) | 11 lines Retain XMPP filters across reconnections so external modules continue to function as expected. Previously if an XMPP client reconnected any filters added by an external module were lost. This issue exhibited itself with chan_motif not receiving and reacting to Jingle signaling. (closes issue ASTERISK-20916) Reported by: kuj ........ Merged revisions 378917 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09Merged revisions 378840 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ........ r378840 | rmudgett | 2013-01-09 16:56:08 -0600 (Wed, 09 Jan 2013) | 2 lines Trivial misc bridge code changes. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09Merged revisions 378823 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ........ r378823 | rmudgett | 2013-01-09 16:15:41 -0600 (Wed, 09 Jan 2013) | 2 lines Tweaked __ast_test_suite_assert_notify() and __ast_test_suite_event_notify() to be void functions. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09Merged revisions 378783,378789-378790 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ................ r378783 | dlee | 2013-01-09 14:30:33 -0600 (Wed, 09 Jan 2013) | 14 lines Fix end condition in ast_rtp_lookup_mime_multiple2. The erroneous end condition would never include the AST_RTP_CISCO_DTMF flag in the debug output. (closes issue ASTERISK-20772) Reported by: Xavier Hienne ........ Merged revisions 378776 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378780 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ r378789 | rmudgett | 2013-01-09 14:56:23 -0600 (Wed, 09 Jan 2013) | 4 lines * Found some more places to use ast_channel_lock_both(). * Minor optimization in ast_rtp_instance_early_bridge(). ................ r378790 | rmudgett | 2013-01-09 15:14:39 -0600 (Wed, 09 Jan 2013) | 4 lines * Whitespace changes. * Made ast_test_init() match its prototype. ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09Merged revisions 378735,378748 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ................ r378735 | dlee | 2013-01-09 13:38:53 -0600 (Wed, 09 Jan 2013) | 13 lines Replace errant tabs with spaces in causes.h. (closes issue ASTERISK-20826) Reported by: snuffy Patches: notabs.dif uploaded by snuffy (license 5024) ........ Merged revisions 378733 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378734 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ r378748 | dlee | 2013-01-09 14:12:00 -0600 (Wed, 09 Jan 2013) | 13 lines Move declaration of ast_regex_string_to_regex_pattern futher down strings.h. The prior location is before the declaration of struct ast_str, which causes compiler warnings. (closes issue ASTERISK-20852) Reported by: Pavel Troller Patches: strings.diff uploaded by Pavel Troller (license 6302) ........ Merged revisions 378747 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-07Address review board feedback from Matt and RichardMark Michelson
* Remove extraneous whitespace * Bump up debug levels of messages and add identifying info to messages. * Account for potential failures of ao2_link() * Add additional test and some more test data * Add some comments in places where they could be useful * Make threadpool listeners and their callbacks optional git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02Merged revisions 378374,378377,378384 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ................ r378374 | rmudgett | 2013-01-02 15:23:16 -0600 (Wed, 02 Jan 2013) | 33 lines Fix AMI redirect action with two channels failing to redirect both channels. The AMI redirect action can fail to redirect two channels that are bridged together. There is a race between the AMI thread redirecting the two channels and the bridge thread noticing that a channel is hungup from the redirects. * Made the bridge wait for both channels to be redirected before exiting. * Made the AMI redirect check that all required headers are present before proceeding with the redirection. * Made the AMI redirect require that any supplied ExtraChannel exist before proceeding. Previously the code fell back to a single channel redirect operation. (closes issue ASTERISK-18975) Reported by: Ben Klang (closes issue ASTERISK-19948) Reported by: Brent Dalgleish Patches: jira_asterisk_19948_v11.patch (license #5621) patch uploaded by rmudgett Tested by: rmudgett, Thomas Sevestre, Deepak Lohani, Kayode Review: https://reviewboard.asterisk.org/r/2243/ ........ Merged revisions 378356 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378358 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ r378377 | mjordan | 2013-01-02 16:10:32 -0600 (Wed, 02 Jan 2013) | 24 lines Prevent crashes from occurring when reading from data sources with large values When reading configuration data from an Asterisk .conf file or when pulling data from an Asterisk RealTime backend, Asterisk was copying the data on the stack for manipulation. Unfortunately, it is possible to read configuration data or realtime data from some data source that provides a large blob of characters. This could potentially cause a crash via a stack overflow. This patch prevents large sets of data from being read from an ARA backend or from an Asterisk conf file. (issue ASTERISK-20658) Reported by: wdoekes Tested by: wdoekes, mmichelson patches: * issueA20658_dont_process_overlong_config_lines.patch uploaded by wdoekes (license 5674) * issueA20658_func_realtime_limit.patch uploaded by wdoekes (license 5674) ........ Merged revisions 378375 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378376 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ r378384 | mjordan | 2013-01-02 16:19:32 -0600 (Wed, 02 Jan 2013) | 11 lines Clean up app_mysql's application entry points to properly parse arguments When parsing arguments, application entry points should not attempt to directly modify the parameters to the function. This patch properly duplicates the passed in parameters before attempting to parse them. (issue ASTERISK-20658) Reported by: wdoekes patches: issueA20658_sanitize_app_mysql.patch uploaded by wdoekes (license 5674) ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02Merged revisions 378322 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ................ r378322 | mjordan | 2013-01-02 12:11:59 -0600 (Wed, 02 Jan 2013) | 33 lines Prevent exhaustion of system resources through exploitation of event cache Asterisk maintains an internal cache for devices in the event subsystem. The device state cache holds the state of each device known to Asterisk, such that consumers of device state information can query for the last known state for a particular device, even if it is not part of an active call. The concept of a device in Asterisk can include entities that do not have a physical representation. One way that this occurred was when anonymous calls are allowed in Asterisk. A device was automatically created and stored in the cache for each anonymous call that occurred; this was possible in the SIP and IAX2 channel drivers and through channel drivers that utilized the res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices are never removed from the system, allowing anonymous calls to potentially exhaust a system's resources. This patch changes the event cache subsystem and device state management to no longer cache devices that are not associated with a physical entity. (issue ASTERISK-20175) Reported by: Russell Bryant, Leif Madsen, Joshua Colp Tested by: kmoore patches: event-cachability-3.diff uploaded by jcolp (license 5000) ........ Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13Merged revisions 378000-378002 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ................ r378000 | seanbright | 2012-12-13 15:20:32 -0600 (Thu, 13 Dec 2012) | 8 lines Make generate_exchange_uuid() always return the passed ast_str pointer. I changed this code earlier to return NULL if it wasn't able to generate a UUID, whereas the earlier code would always return the ast_str that was passed in. Switch back to returning the ast_str, only set it to the empty string instead if UUID generation fails. We still do a validity check later which will catch this and blow up if necessary. ................ r378001 | wedhorn | 2012-12-13 15:25:31 -0600 (Thu, 13 Dec 2012) | 9 lines Minor fixes for chan_skinny Whitespace, change SUBSTATE_ONHOOK to correct SKINNY_ONHOOK and correct len of 2 strcmp in skinny_setdebug(). (see opticron's review on https://reviewboard.asterisk.org/r/2240/) ........ Merged revisions 377991 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ r378002 | rmudgett | 2012-12-13 15:28:15 -0600 (Thu, 13 Dec 2012) | 35 lines confbridge: Fix MOH on simultaneous user entry to a new conference. When two users entered a new conference simultaneously, one of the callers hears MOH. This happened if two unmarked users entered simultaneously and also if a waitmarked and a marked user entered simultaneously. * Created a confbridge internal MOH API to eliminate the inlined MOH handling code. Note that the conference mixing bridge needs to be locked when actually starting/stopping MOH because there is a small window between the conference join unsuspend MOH and actually joining the mixing bridge. * Created the concept of suspended MOH so it can be interrupted while conference join announcements to the user and DTMF features can operate. * Suspend any MOH until the user is about to actually join the mixing bridge of the conference. This way any pre-join file playback does not need to worry about MOH. * Made post-join actions only play deferred entry announcement files. Changing the user/conference state during that time is not protected or controlled by the state machine. (closes issue ASTERISK-20606) Reported by: Eugenia Belova Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/2232/ ........ Merged revisions 377992 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377993 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13Merged revisions 377981 via svnmerge from Automerge script
file:///srv/subversion/repos/asterisk/trunk ........ r377981 | dlee | 2012-12-13 10:43:40 -0600 (Thu, 13 Dec 2012) | 1 line Bail configure if it can't find libuuid. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13Resolve conflict and reset automerge.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11Add automerge property back after conflict.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11Some general cleanup, plus we now send state changes when threads activate.Mark Michelson
This is now ready for review board, imo! git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11Add auto-increment option and accompanying test.Mark Michelson
This allows for the threadpool to automatically grow if tasks are pushed to it and no idle threads are currently available. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11Some documentation fixes and function call name fixes.Mark Michelson
The documentation for taskprocessors was incorrect with regards to when a listener's alloc callback was called. I also made the names of queued function calls in the threadpool more uniform. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10Solve the issue about the "CHANGE THIS" and "XXX CHANGE THIS XXX" ↵Mark Michelson
taskprocessor names. Unfortunately, this required a taskprocessor listener change that makes listener allocation utterly silly. I'm going to change the scheme so that allocation of taskprocessor listeners is done internally within taskprocessor code. This will make it parallel with threadpool code, which is a good thing. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10Add threadpool options and accompanying test.Mark Michelson
The only test added so far is an idle thread timeout option. This will greatly aid threadpool users who wish to maintain a threadpool by allowing for idle threads to die out as necessary. Test passes. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07Add new threadpool test and fix some taskprocessor bugs.Mark Michelson
The new thread creation test fails because Asterisk locks up while trying to lock a taskprocessor. While trying to debug that, I found a race condition during taskprocessor creation where a default taskprocessor listener could try to operate on a partially started taskprocessor. This was fixed by adding a new callback to taskprocessor listeners. Then while testing that change, I found some bugs in the taskprocessor tests where I was not properly unlocking when done with a lock. Scoped locks have spoiled me a bit. I still have not figured out why the threadpool thread creation test is locking up. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377368 65c4cc65-6c06-0410-ace0-fbb531ad65f3