Replace usage of ao2_container_alloc with ao2_container_alloc_hash or
ao2_container_alloc_list. Remove ao2_container_alloc macro.
Change-Id: I0907d78bc66efc775672df37c8faad00f2f6c088
* ACO options
* Indications
* Module loader ref_debug object
* Media index info and variants
* xmldoc items
These allocation locations were identified using reflocks.py on the
master branch.
Change-Id: Ie999b9941760be3d1946cdb6e30cb85fd97504d8
This eliminates some wasteful operations in media_index startup.
* Replace statically set string-fields with char[0].
* Eliminate pointless RAII_VAR's.
* alloc_variant: Avoid pointless ao2_find on new info->variant.
* Stop trying find_variant before alloc_variant.
* process_media_file: replace ast_str with ast_asprintf. This avoids
reallocation of file_id_str.
Overall sounds_index.c is about 27% of Asterisk startup time when using
sample configs. This patch reduces it to 20%. This is a half-fix. The
real problem is that the media_index is regenerated repeatedly - 68
times in my test.
Change-Id: Ia50b752f8efb356f852b05c4be495a6631af8652
Based on feedback from ipengineer in #asterisk, when the media indexer
cannot access a sound file on the system (or otherwise fails) Asterisk
displays a "Cannot frob file" error but fails to tell you why. This is
especially problematic as the media_indexer failing will rpevent Asterisk
from starting, as it is in the core.
We now display the errno error messages so folks can figure out what they've
done wrong.
........
Merged revisions 402285 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Channel snapshots have string representations of the channel's native formats.
Prior to this change, the format strings were re-created on ever channel snapshot
creation. Since channel native formats rarely change, this was very wasteful.
Now, string representations of formats may optionally be stored on the ast_format_cap
for cases where string representations may be requested frequently. When formats
are altered, the string cache is marked as invalid. When strings are requested, the
cache validity is checked. If the cache is valid, then the cached strings are copied.
If the cache is invalid, then the string cache is rebuilt and copied, and the cache
is marked as being valid again.
Review: https://reviewboard.asterisk.org/r/2879
........
Merged revisions 400356 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This adds support for stasis/sounds and stasis/sounds/{ID} queries via
the Asterisk RESTful Interface (ARI, formerly Stasis-HTTP).
The following changes have been made to accomplish this:
* A modular indexer was created for local media.
* A new function to get an ast_format associated with a file extension
was added.
* Modifications were made to the built-in HTTP server so that URI
decoding could be deferred to the URI handler when necessary.
* The Stasis-HTTP sounds JSON documentation was modified to handle
cases where multiple languages are installed in different formats.
* Register and Unregister events for formats were added to the system
topic.
(closes issue ASTERISK-21584)
(closes issue ASTERISK-21585)
Review: https://reviewboard.asterisk.org/r/2507/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392700 65c4cc65-6c06-0410-ace0-fbb531ad65f3