summaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2018-03-21Merge "core: Stop using AST_INLINE_API for allocator functions."Jenkins2
2018-03-19core: Remove additional symbols.Corey Farrell
Remove symbols that are depreacated and replaced: * ast_channel_datastore_alloc * ast_channel_datastore_free * ast_channel_cmpwhentohangup * ast_channel_setwhentohangup * config_text_file_save * devstate2str * ast_device_state_changed * ast_device_state_changed_literal * ast_verbose_get_by_module Remove unused symbols: * channelreloadreason2txt (last used in Asterisk 12). Remove unused ast_options flags: * AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN / ast_opt_end_cdr_before_h_exten * AST_OPT_FLAG_VERBOSE_MODULE / ast_opt_verb_module * AST_OPT_FLAG_INITIATED_SECONDS Change-Id: I841255995d195f8efc1ed47af9c7a2f131c08645
2018-03-17core: Stop using AST_INLINE_API for allocator functions.Corey Farrell
This replaces AST_INLINE_API allocators in utils.h with real functions implemented in astmm.c. Associated macro's are also moved from utils.h to astmm.h. Remove menuselect conflicts between MALLOC_DEBUG and DEBUG_CHAOS as they can now be combined. This has multiple benefits: * Simplifies asterisk/utils.h by removing inline functions and use of the logger. * Removal of these inline functions decreases size of Asterisk and module binaries by 1% or more. * Puts memory management functions together with and without MALLOC_DEBUG enabled, simplifying management of the code. * Enables DEBUG_CHAOS for ASTMM_REDIRECT and bundled pjproject. Change-Id: If9df4377f74bdbb627461b27a473123e05525887
2018-03-13core: Remove incorrect usage of attribute_malloc.Corey Farrell
GCC documentation states that when __attribute__((malloc)) is used it should not return storage which contains any valid pointers. It specifically mentions that realloc functions should not have the malloc attribute, but this also means that complex initializers which could contain initialized pointers should not use this attribute. Change-Id: If507f33ffb3ca3b83b702196eb0e8215d27fc7d2
2018-01-25Build System: Require __sync or __atomic functions.Corey Farrell
This change causes the configure script to throw an error if neither __sync nor __atomic builtin functions are available. ASTERISK-27619 Change-Id: Ie01a281e0f5c41dfeeb5f250c1ccea8752f56ef9
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-10-24Single API for ast_store_lock_info and ast_remove_lock_info.Corey Farrell
This makes the 'bt' parameter unconditional for ast_store_lock_info and ast_remove_lock_info. The 'bt' parameter is unused when HAVE_BKTR is undefined. Change-Id: Ieced0e920928b735a39c3b5952b806c473d67453
2017-08-01Fix compiler warnings on Fedora 26 / GCC 7.Corey Farrell
GCC 7 has added capability to produce warnings, this fixes most of those warnings. The specific warnings are disabled in a few places: * app_voicemail.c: truncation of paths more than 4096 chars in many places. * chan_mgcp.c: callid truncated to 80 chars. * cdr.c: two userfields are combined to cdr copy, fix would break ABI. * tcptls.c: ignore use of deprecated method SSLv3_client_method(). ASTERISK-27156 #close Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
2017-02-23Binaural synthesis (confbridge): Adds binaural synthesis to bridge_softmix.frahaase
Adds binaural synthesis to bridge_softmix (via convolution using libfftw3). Binaural synthesis is conducted at 48kHz. For a conference, only one spatial representation is rendered. The default rendering is applied for mono-capable channels. ASTERISK-26292 Change-Id: Iecdb381b6adc17c961049658678f6219adae1ddf
2017-02-15Binaural synthesis (confbridge): Adds utils/conf_bridge_binaural_hrir_importerDennis Guse
Adds the import tool for converting a HRIR database to hrirs.h ASTERISK-26292 Change-Id: I51eb31b54c23ffd9b544bdc6a09d20c112c8a547
2017-01-04core/pbx: dialplan show - display filename/line#Jonathan R. Rose
Adds the ability for extensions to be registered to include filename and line number so that dialplan show output can show the filename and line number of a config file responsible for generating a given extension. This only affects config modules that are written to use the new extension registering functions. In this patch, that only includes pbx_config, so extensions registered in extensions.conf and any included extension will be shown in this manner. Extensions registered in this manner will show the filename and line number *instead* of the registrar. ASTERISK-26658 #close Reported by: Jonathan R. Rose Change-Id: Ieccc6abccdff34ed5c7da3511fd24972b8f2dd30
2016-10-27Remove ASTERISK_REGISTER_FILE.Corey Farrell
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes all traces of it. Previously exported symbols removed: * __ast_register_file * __ast_unregister_file * ast_complete_source_filename This also removes the mtx_prof static variable that was declared when MTX_PROFILE was enabled. This variable was only used in lock.c so it is now initialized in that file only. ASTERISK-26480 #close Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-09-29core: Remove ABI effects of LOW_MEMORY.Corey Farrell
This allows asterisk to compiled with LOW_MEMORY to load modules built without LOW_MEMORY. ASTERISK-26398 #close Change-Id: I24b78ac9493ab933b11087a8b6794f3c96d4872d
2016-08-19Fix naming mismatch of allocator functions.Corey Farrell
Allocator functions that take file/line/func parameters are prefixed with single-underscore when MALLOC_DEBUG is not defined, double-underscore when it is defined. This change updates all allocators that accept file/line/func to have the same prototype in either ABI mode. The parameter order of __ast_vasprintf and __ast_asprintf in utils.h have been changed to match that of astmm.h. End-use allocator macro's have been removed from astmm.h and moved to an unconditional part of utils.h. Change-Id: I823bb6ce2b5675b3a4735948f10a3b420e9a023a
2016-07-21pbx: Create pbx_sw.c for management of 'struct ast_sw'.Corey Farrell
This changes context switches from a linked list to a vector, makes 'struct ast_sw' opaque to pbx.c. Although ast_walk_context_switches is maintained the procedure is no longer efficient except for the first call (inc==NULL). This functionality is replaced by two new functions implemented by vector macros. * ast_context_switches_count (AST_VECTOR_SIZE) * ast_context_switches_get (AST_VECTOR_GET) As with ast_walk_context_switches callers of these functions are expected to have locked contexts. Only a few places in Asterisk walked the switches, they have been converted to use the new functions. Change-Id: I08deb016df22eee8288eb03de62593e45a1f0998
2016-07-18pbx: Create pbx_ignorepat.c for management of 'struct ast_ignorepat'.Corey Farrell
This changes context ignore patterns from a linked list to a vector, makes 'struct ast_ignorepat' opaque to pbx.c. Although ast_walk_context_ignorepats is maintained the procedure is no longer efficient except for the first call (inc==NULL). This functionality is replaced by two new functions implemented by vector macros. * ast_context_ignorepats_count (AST_VECTOR_SIZE) * ast_context_ignorepats_get (AST_VECTOR_GET) As with ast_walk_context_ignorepats callers of these functions are expected to have locked contexts. Only a few places in Asterisk walked the ignorepats, they have been converted to use the new functions. Change-Id: I78f2157d275ef1b7d624b4ff7d770d38e5d7f20a
2016-07-15pbx: Create pbx_include.c for management of 'struct ast_include'.Corey Farrell
This changes context includes from a linked list to a vector, makes 'struct ast_include' opaque to pbx.c. Although ast_walk_context_includes is maintained the procedure is no longer efficient except for the first call (inc==NULL). This functionality is replaced by two new functions implemented by vector macros. * ast_context_includes_count (AST_VECTOR_SIZE) * ast_context_includes_get (AST_VECTOR_GET) As with ast_walk_context_includes callers of these functions are expected to have locked contexts. Only a few places in Asterisk walked the includes, they have been converted to use the new functions. const have been applied where possible to parameters for ast_include functions. Change-Id: Ib5c882e27cf96fb2aec67a39c18b4c71c9c83b60
2016-05-14logger: Support JSON logging with Verbose messagesMatt Jordan
When 2d7a4a3357 was merged, it missed the fact that Verbose log messages are formatted and handled by 'verbosers'. Verbosers are registered functions that handle verbose messages only; they exist as a separate class of callbacks. This was done to handle the 'magic' that must be inserted into Verbose messages sent to remote consoles, so that the consoles can format the messages correctly, i.e., the leading tabs/characters. In reality, verbosers are a weird appendage: they're a separate class of formatters/message handlers outside of what handles all other log messages in Asterisk. After some code inspection, it became clear that simply passing a Verbose message along with its 'sublevel' importance through the normal logging mechanisms removes the need for verbosers altogether. This patch removes the verbosers, and makes the default log formatter aware that, if the log channel is a console log, it should simply insert the 'verbose magic' into the log messages itself. This allows the console handlers to interpret and format the verbose message themselves. This simplifies the code quite a lot, and should improve the performance of printing verbose messages by a reasonable factor: (1) It removes a number of memory allocations that were done on each verobse message (2) It removes the need to strip the verbose magic out of the verbose log messages before passing them to non-console log channels (3) It now performs fewer iterations over lists when handling verbose messages Since verbose messages are now handled like other log messages (for the most part), the JSON formatting of the messages works as well. ASTERISK-25425 Change-Id: I21bf23f0a1e489b5102f8a035fe8871552ce4f96
2015-06-05Fixes for OS XDavid M. Lee
* Add some type casting so tv_usec can really be a long, instead of some strange platform specific type. * Add some .dylib style files to .gitignore. * Switch from using -Xlinker to -Wl,. For [reasons unknown][], newer versions of GCC, when compiling the Homebrew formula for Asterisk, are not properly passing the -Xlinker options to the linker. Given that -Wl, does exactly the [same thing][], and does it properly, this patch changes the -Xlinker options to use -Wl, instead. [reasons unknown]: http://bit.ly/1SUbEYx [same thing]: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html Change-Id: Id5e6b3c6cc86282ea5fca630dc3991137c5bf4dd
2015-05-19doxygen: Fix doxygen errorsMatt Jordan
This patch fixes a number of errors and warning messages in the doxygen log. Specifically, it addresses: * A number of files incorrectly places a '\brief' tag immediately after a '\file' tag. Doing so emits a warning, as '\file' takes an optional argument specifying which file the doxygen comment is for. As '\brief' is not a file, doxygen was unamused. * A grouping of Stasis Topics and Messages in rtp_engine.h was incorrectly terminated. We now correctly terminate the grouping, which prevents members of rtp_engine.h from showing up in the wrong group. * Group indicators which are not part of the Stasis Topics and Messages group were removed. Group indicators without an \addtogroup or \ingroup have no meaning. Change-Id: Ia1415ffec6767e27233ae1cae5ed5970de5656d4
2015-05-13MALLOC_DEBUG: Replace WRAP_LIBC_MALLOC with ASTMM_LIBC.Corey Farrell
There are 3 ways that calls directly to standard allocator functions can be dealt with: 1. Block their use, cause them to generate an error. This is the default. 2. Replace them with the Asterisk equivalent function calls. 3. Leave them alone. This change allows one of these 3 options to be selected by any source. The source just needs to define ASTMM_LIBC to ASTMM_BLOCK, ASTMM_REDIRECT, or ASTMM_IGNORE to use option 1, 2 or 3 respectively. Normally ASTMM_BLOCK is the correct option, so it is default when ASTMM_LIBC is not defined. In some cases when building 3rd party code it is desirable to have it use Asterisk functions, without changing the whole source - ASTMM_REDIRECT accomplishes this. When using 3rd party libraries sometimes a static inline function will make use of malloc or free. In these cases it may be unsafe to replace the allocator in the header, as it's possible the memory could be freed by the library using standard allocators. For those cases ASTMM_IGNORE is needed. Change-Id: I8afef4bc7f3b93914263ae27d3a5858b69663fc7
2015-05-03utils: Remove trailing whitespaceRodrigo Ramírez Norambuena
Change-Id: I4644f43a6a1ca9b5130cd2a6746772b888eb4f7a
2015-05-04CLI: Enable automatic references to modules.Corey Farrell
* Pass module to ast_cli_register and ast_cli_register_multiple. * Add a module reference before executing any CLI callback, remove the reference when complete. ASTERISK-25049 #close Reported by: Corey Farrell Change-Id: I7aafc7c9f2b912918f28fe51d51e9e8a755750e3
2015-05-04Modules: Make ast_module_info->self available to auxiliary sources.Corey Farrell
ast_module_info->self is often needed to register items with the core. Many modules have ad-hoc code to make this pointer available to auxiliary sources. This change updates the module build process to make the needed information available to all sources in a module. ASTERISK-25056 #close Reported by: Corey Farrell Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
2015-04-13Fixing extconf compileDavid M. Lee
During the mass code deletion for clang support, a stray backslash was left behind that was causing utils to fail to compile. Change-Id: I60e5fa58c9a5b248bde23aaada79ff663f87a2a1
2015-04-13git migration: Refactor the ASTERISK_FILE_VERSION macroMatt Jordan
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-11Add .gitignore and .gitreview filesGeorge Joseph
Add the .gitignore and .gitreview files to the asterisk repo. NB: You can add local ignores to the .git/info/exclude file without having to do a commit. Common ignore patterns are in the top-level .gitignore file. Subdirectory-specific ignore patterns are in their own .gitignore files. Change-Id: I842a1588ff27d8a0189f12d597f0a7af033d6c69 Tested-by: George Joseph
2015-04-06clang compiler warnings: Remove large chunks of unused code from extconfMatthew Jordan
This patch fixes a warning caught by clang, in which it detected that large chunks of extconf were unused. Frankly, I wish we could pretend that all of extconf was unused, but alas, that is not yet the case. A few extraneous functions in the parking tests were removed as well, for the same reason. Review: https://reviewboard.asterisk.org/r/4553 ASTERISK-24917 Reported by: dkdegroot patches: rb4553.patch submitted by dkdegroot (License 6600) ........ Merged revisions 434093 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 434097 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-28clang compiler warnings: Fix a variety of "unused" warningsMatthew Jordan
This patch fixes the -Wunused-value -Wunused-variable -Wunused-const-variable errors caught by clang. Specifically: * apps/app_queue.c: removed unused qpm_cmd_usage[], qum_cmd_usage[], qsmp_cmd_usage[] * cel/cel_sqlite3_custom.c: removed unused name[] = "cel_sqlite3_custom" * channels/chan_pjsip.c: removed unused desc[] = "PJSIP Channel" * codecs/gsm/src/gsm_create.c: removed unused ident[] = "$Header$" * funcs/func_env.c:729: Fixed ast_str_append_substr. * main/editline/np/strlcat.c: removed unused rcsid variable * main/editline/np/strlcpy.c: removed unused rcsid variable * main/security_events.c: removed unused TIMESTAMP_STR_LEN * utils/conf2ael.c: removed unused cfextension_states * utils/extconf.c: removed unused cfextension_states Review: https://reviewboard.asterisk.org/r/4526 ASTERISK-24917 Reported by: dkdegroot patches: rb4526.patch submitted by dkdegroot (License 6600) ........ Merged revisions 433693 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 433694 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-28clang compiler warnings: Fix -Wparantheses-equality warningsMatthew Jordan
Clang will treat ((a == b)) as a warning, as it reasonably expects that the developer may have intended to write (a == b) or ((a = b)). This patch cleans up all instances where equality, not assignment, was intended between two parantheses. Review: https://reviewboard.asterisk.org/r/4531/ ASTERISK-24917 Repoted by: dkdegroot patches: rb4531.patch submitted by dkdegroot (License 6600) ........ Merged revisions 433687 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 433688 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-26Fix compile errors caused by r4500 / r4501.Corey Farrell
* Add ast_register_cleanup to utils/clicompat.c to deal with any utils that copy sources from main. * Asterisk 13+: remove unused variables from core_local.c. Review: https://reviewboard.asterisk.org/r/4534/ ........ Merged revisions 433499 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 433500 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-17Fix printf problems with high ascii characters after r413586 (1.8).Walter Doekes
In r413586 (1.8) various casts were added to silence gcc 4.10 warnings. Those fixes included things like: -out += sprintf(out, "%%%02X", (unsigned char) *ptr); +out += sprintf(out, "%%%02X", (unsigned) *ptr); That works for low ascii characters, but for the high range that yields e.g. FFFFFFC3 when C3 is expected. This changeset: - fixes those casts to use the 'hh' unsigned char modifier instead - consistently uses %02x instead of %2.2x (or other non-standard usage) - adds a few 'h' modifiers in various places - fixes a 'replcaes' typo - dev/urandon typo (in 13+ patch) Review: https://reviewboard.asterisk.org/r/4263/ ASTERISK-24619 #close Reported by: Stefan27 (on IRC) ........ Merged revisions 429673 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429674 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 429675 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-26core: Don't allow free to mean ast_free (and malloc, etc..).Walter Doekes
This gets rid of most old libc free/malloc/realloc and replaces them with ast_free and friends. When compiling with MALLOC_DEBUG you'll notice it when you're mistakenly using one of the libc variants. For the legacy cases you can define WRAP_LIBC_MALLOC before including asterisk.h. Even better would be if the errors were also enabled when compiling without MALLOC_DEBUG, but that's a slightly more invasive header file change. Those compiling addons/format_mp3 will need to rerun ./contrib/scripts/get_mp3_source.sh. ASTERISK-24348 #related Review: https://reviewboard.asterisk.org/r/4015/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-04Remove many deprecated modulesMatthew Jordan
Billing records are fair, To get paid is quite bright, You should really use ODBC; Good-bye cdr_sqlite. Microsoft did once push H.323, Hell, we all remember NetMeeting. But try to compile chan_h323 now And you will take quite a beating. The XMPP and SIP war was fierce, And in the distant fray Was birthed res_jabber/chan_jingle; But neither to stay. For everyone did care and chase what Google professed. "Free Internet Calling" was what devotees cried, But Google did change the specs so often That the developers were happy the day chan_gtalk died. And then there was that odd application Dedicated to the Polish tongue. app_saycountpl was subsumed by Say; One could say its bell was rung. To read and parse a file from the dialplan You could (I guess) use an application. app_readfile did fill that purpose, but I think A function is perhaps better in its creation. Barging is rude, I'm not sure why we do it. Inwardly, the caller will probably sigh. But if you really must do it, Don't use app_dahdibarge, use ChanSpy. We all despise the sound of tinny robots It makes our queues so cold. To control such an abomination It's better to not use Wait/SetMusicOnHold. It's often nice to know properties of a channel It makes our calls right We have a nice function called CHANNEL And so SIPCHANINFO is sent off into the night. And now things get odd; Apparently one could delimit with a colon Properties from the SIPPEER function! Commas are in; all others are done. Finally, a word on pipes and commas. We're sorry. We can't say it enough. But those compatibility options in asterisk.conf; To maintain them forever was just too tough. This patch removes: * cdr_sqlite * chan_gtalk * chan_jingle * chan_h323 * res_jabber * app_saycountpl * app_readfile * app_dahdibarge It removes the following applications/functions: * WaitMusicOnHold * SetMusicOnHold * SIPCHANINFO It removes the colon delimiter from the SIPPEER function. Finally, it also removes all compatibility options that were configurable from asterisk.conf, as these all applied to compatibility with Asterisk 1.4 systems. Review: https://reviewboard.asterisk.org/r/3698/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11utils dir: Remove no longer needed traces of refcounter except in the clean ↵Richard Mudgett
make target. * Removed no longer needed files from the svn:ignore property to make them visible. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11main/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG outputMatthew Jordan
This patch does the following: (1) It makes REF_DEBUG a meneselect item. Enabling REF_DEBUG now enables REF_DEBUG globally throughout Asterisk. (2) The ref debug log file is now created in the AST_LOG_DIR directory. Every run will now blow away the previous run (as large ref files sometimes caused issues). We now also no longer open/close the file on each write, instead relying on fflush to make sure data gets written to the file (in case the ao2 call being performed is about to cause a crash) (3) It goes with a comma delineated format for the ref debug file. This makes parsing much easier. This also now includes the thread ID of the thread that caused ref change. (4) A new python script instead for refcounting has been added in the contrib/scripts folder. (5) The old refcounter implementation in utils/ has been removed. Review: https://reviewboard.asterisk.org/r/3377/ ........ Merged revisions 412114 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 412115 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 412153 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-04internal_timing: Remove the option and always make it enabled if a timing ↵Richard Mudgett
module is loaded. The masquerade supertest frequently fails because either the local channel chain doesn't completely optimize out or the DTMF handshake doesn't completely get accross. Local channel optimization requires frames flowing to trigger when optimization can happen. When optimization happens the media frame that triggered the optimization is dropped. Sending DTMF requires frames to flow in the other direction for timing purposes while sending nothing. If internal timing is not enabled when MOH is playing, Asterisk switches to received timing when an audio frame is received. With optimization dropping media frames and MOH not sending frames unless it receives frames, occasionaly there are no more frames being passed and the test fails. * The asterisk command line -I option and the asterisk.conf internal_timing option are removed. Asterisk now always uses internal timing when needed if any timing module is loaded. The issue ASTERISK-14861 did this quite awhile ago in v1.4 but effectively is broken if other internal timing modules besides DAHDI are used. The ast_read_generator_actions() now only does received timing if it has no choice for frame generators like MOH, silence, and playback streaming. * Cleaned up some code dealing with frame generators in ast_deactivate_generator(), generator_write_format_change(), ast_activate_generator(), and ast_channel_stop_silence_generator(). * Removed ast_internal_timing_enabled(), AST_OPT_FLAG_INTERNAL_TIMING, and ast_opt_internal_timing. ASTERISK-22846 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3414/ ........ Merged revisions 411715 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 411716 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 411717 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25Revert -r411073. It didn't help and blew up the system.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-24locking: Add temporary sanity checks.Richard Mudgett
Add some temporary sanity checks to hunt for locking problems with the masquerade supertest. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-21Make the AEL load process less chatty.Sean Bright
Switched a bunch of LOG_NOTICEs to ast_debug. This time without breaking the build. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27Fix memory stomping bug in astman.David M. Lee
This memset complained in dev mod on my Ubuntu box. The memset is both unnecessary and dangerous. At this point, m hasn't been initialized yet, so the memset will write off to whatever address happens to be on the stack at the time. ........ Merged revisions 409077 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 409083 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409087 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22Remove extra defines of AST_PBX_MAX_STACK.Corey Farrell
* Ensure AST_PBX_MAX_STACK is only defined in extconf.h and pbx.h. * Fix incorrect function parameters in utils/extconf.c. (closes issue ASTERISK-23141) Reported by: Maxim Review: https://reviewboard.asterisk.org/r/3241/ ........ Merged revisions 408785 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 408786 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 408787 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22pbx.c: Pre-initialize timezone to avoid crash on destroyScott Griepentrog
In ast_build_timing, initialize the timezone value to NULL in order to avoid deferencing an uninitialized value later when calling ast_destroy_timing. The timezone value could be uninitialized if ast_build_timing were to fail due to a zero length time string. (closes issue ASTERISK-22861) Reported by: Sebastian Murray-Roberts Review: https://reviewboard.asterisk.org/r/3134/ Patches: ast_build_timing-initialize-timezone.patch uploaded by coreyfarrell (license 5909) ........ Merged revisions 406241 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 406245 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 406264 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08app_dahdiras: Use waitpid instead of wait4.Kevin Harwell
Several places in the code were using wait4 while other places were using waitpid. This change makes all places use waitpid in order to make things more consistent and since the 'rusage' object passed in/out of wait4 was never used. (closes issue ASTERISK-22557) Reported by: YvesGael Patches: asterisk-11.5.1-wait4.patch uploaded by hurdman (license 6537) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25Put clicompat-r2.patch back inJonathan Rose
We've figured out how to resolve the problems this was causing in 12/trunk, so this can go back in now. (issue ASTERISK-22467) Reported by: Corey Farrell Patches: clicompat-r2.patch uploaded by coreyfarrell (license 5909) ........ Merged revisions 401914 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 401935 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 401936 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-25revert clicompat-r2.patch from r401704Jonathan Rose
Patch caused the following build errors against testsuite https://bamboo.asterisk.org/bamboo/browse/AST-ATRUNKBUILD4-244 (issue ASTERISK-22467) Reported by: Corey Farrell ........ Merged revisions 401895 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 401896 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 401897 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24memory leaks: Memory leak cleanup patch by Corey Farrell (second set)Jonathan Rose
Also covers ast_app_parse_timelen-fail-zero-length.patch, but the patch was replaced with one of my own. (issue ASTERISK-22467) Reported by: Corey Farrell Patches: chan_dahdi-cleanup_push.patch uploaded by coreyfarrell (license 5909) clicompat-r2.patch uploaded by coreyfarrell (license 5909) codecs-ilbc-doCPLC.patch uploaded by coreyfarrell (license 5909) data-cleanup-test-registration.patch uploaded by coreyfarrell (license 5909) main-asterisk-kill-listener.patch uploaded by coreyfarrell (license 5909) ........ Merged revisions 401704 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 401705 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 401706 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10Fixed utils directory breakage from r398748, this time with extra hate.David M. Lee
........ Merged revisions 398752 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 398753 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 398754 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10Fixed utils directory breakage from r398648David M. Lee
........ Merged revisions 398748 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 398749 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 398750 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06Check result of ast_var_assign() calls for memory allocation failure.Walter Doekes
We try to keep the system running even when all available memory is spent. Review: https://reviewboard.asterisk.org/r/2734/ ........ Merged revisions 396279 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 396287 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396309 65c4cc65-6c06-0410-ace0-fbb531ad65f3