summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2018-03-05Merge "BuildSystem: Detect whether uselocale(.) is available."Jenkins2
2018-03-05Merge "core: Fix handling of maximum length lines in config files."Jenkins2
2018-03-03BuildSystem: Cast any intptr_t explicitly to its proposed type.Alexander Traud
ASTERISK-27713 Change-Id: I90c769e3c7f8c26de8a3af11335862cec15a1b22
2018-03-03BuildSystem: Detect whether uselocale(.) is available.Alexander Traud
ASTERISK-27712 Reported by: Joerg Sonnenberger, D'Arcy Cain Change-Id: Idf1c9d43617a3e13028b95b313415903d80ef807
2018-03-01core: Remove ABI effects of MALLOC_DEBUG.Richard Mudgett
This allows asterisk to be compiled with MALLOC_DEBUG to load modules built without MALLOC_DEBUG. Now pre-compiled third-party modules will still work regardless of MALLOC_DEBUG being enabled or not. Change-Id: Ic07ad80b2c2df894db984cf27b16a69383ce0e10
2018-02-28pjproject: Add cache_pools debugging option.Richard Mudgett
The pool cache gets in the way of finding use after free errors of memory pool contents. Tools like valgrind and MALLOC_DEBUG don't know when a pool is released because it gets put into the cache instead of being freed. * Added the "cache_pools" option to pjproject.conf. Disabling the option helps track down pool content mismanagement when using valgrind or MALLOC_DEBUG. The cache gets in the way of determining if the pool contents are used after free and who freed it. To disable the pool caching simply disable the cache_pools option in pjproject.conf and restart Asterisk. Sample pjproject.conf setting: [startup] cache_pools=no * Made current users of the caching pool factory initialization and destruction calls call common routines to create and destroy cached pools. ASTERISK-27704 Change-Id: I64d5befbaeed2532f93aa027a51eb52347d2b828
2018-02-23core: Fix handling of maximum length lines in config files.Corey Farrell
When a line is the maximum length "\n" is found at sizeof(buf) - 2 since the last character is actually the null terminator. In addition if a line was exactly 8190 plus a multiple of 8192 characters long the config parser would skip the following line. Additionally fix comment in voicemail.conf sample config. It previously stated that emailbody can only contain up to 512 characters which is always wrong. The buffer is normally 8192 characters unless LOW_MEMORY is enabled then it is 512 characters. The updated comment states that the line can be up to 8190 or 510 characters since the line feed and NULL terminator each use a character. ASTERISK-26688 #close Change-Id: I80864a0d40d2e2d8cd79d72af52a8f0a3a99c015
2018-02-21manager.c: Fix lseek() parameter order.Richard Mudgett
ASTERISK-27659 Change-Id: I04a2705d2cb7df250769967bc59e2b397a49b797
2018-02-21AST-2018-001: rtp / channel: Don't allow an unnegotiated format to be passed up.Joshua Colp
When an RTP packet is received by an RTP engine it has to map the payload into the Asterisk format. The code was incorrectly checking our own static list for ALL payloads if it couldn't find a negotiated one. This included dynamic payloads. If the payload mapped to a format of a different type (for example receiving a video packet on an audio RTP instance) then the core stream code could cause a crash if a legacy channel driver was in use as no stream would be present. To provide further protection the core stream code will no longer assume that a video or audio frame will always have a stream for legacy channel drivers. If no stream is present the frame is dropped. ASTERISK-27488 Change-Id: I022556f524ad8379ee73f14037040af17ea3316a
2018-02-20channel.c: Fix typo.Richard Mudgett
Change-Id: I4eeedf89085697e81c354eb92d546686c67b0b5b
2018-02-20Merge "core: Rename sounds_index.c to sounds.c."Jenkins2
2018-02-20Merge "config: Fix locking for extconfig reload."Jenkins2
2018-02-19Merge "optional_api: Refactor to use vector's and standard allocators."Jenkins2
2018-02-19Merge "rtp_engine: Load format name / mime type in uppercase again."Jenkins2
2018-02-19Merge "manager: Add AMI event Load/Unload"Jenkins2
2018-02-19core: Rename sounds_index.c to sounds.c.Corey Farrell
This will make the source filename match the 'module reload sounds' command. This will allow conversion to a built-in module in Asterisk 16 without needing to redefine AST_MODULE. Change-Id: Ifb8e489575b27eb33d8c0b6a531f266670557f6e
2018-02-19config: Fix locking for extconfig reload.Corey Farrell
Expand locking to include full reload process for extconfig to ensure nothing can read the config mappings between clearing and reloading. Change-Id: I378316bad04f1b599ea82d0fef62b8978a644b92
2018-02-17rtp_engine: Load format name / mime type in uppercase again.Alexander Traud
This reverts a previous change partly. ASTERISK-27689 Change-Id: Ia3d2f282db6995be8c1c253b5d52f6038761e8af
2018-02-15bridge_roles: Use a non-locking linked list where appropriateSean Bright
Also explicitly initialize with the AST_LIST_HEAD_NOLOCK_INIT macro for clarity. Change-Id: I4bc39ec33bc3ff77e1a971a01ace87deb965be3f
2018-02-14Merge "main/asterisk.c: Remove silly usage of RAII_VAR."Jenkins2
2018-02-13Merge "core: Remove embedded editline."Jenkins2
2018-02-13Merge "json: Add conditionals to avoid locking if Jansson is thread safe."Joshua Colp
2018-02-12main/asterisk.c: Remove silly usage of RAII_VAR.Corey Farrell
Change-Id: I7e2996397fbd3c3a6a69dd805c38448ddfc34ae9
2018-02-12optional_api: Refactor to use vector's and standard allocators.Corey Farrell
* Replace ad-hoc array management with macro's from vector.h. * Remove redundent logger messages. * Use normal Asterisk allocators instead of directly using libc allocators. * Free memory when an API has no implementation or users. Change-Id: Ic6ecb31798d4a78e7df39ece86a68b60eac05bf5
2018-02-12Merge "cdr.c: Fix runtime leak of CDR records."Jenkins2
2018-02-12manager: Add AMI event Load/UnloadSungtae Kim
Add an AMI events Load and Unload for notify when the module has been loaded and unloaded. ASTERISK-27661 Change-Id: Ib916c41eddd63651952998f2f49c57c42ef87a64
2018-02-12json: Add conditionals to avoid locking if Jansson is thread safe.Corey Farrell
Jansson is thread safe for all read-only functions and reference counting starting v2.11. This allows simplification of our code and removal of locking around reference counting and dumping. Change-Id: Id985cb3ffa6681f9ac765642e20fcd187bd4aeee
2018-02-12core: Remove embedded editline.Corey Farrell
This removes the embedded copy of editline from the Asterisk source tree, making a system copy of libedit mandatory in Asterisk 16+. ASTERISK-27634 #close Change-Id: Iedb64ad92acb78419f3caefedaa2bb7cd2a1a33f
2018-02-10backtrace: Avoid potential spurious output.Alexander Traud
clang 4.0 found this via -Wlogical-not-parentheses. ASTERISK-27642 Change-Id: I9ec3e144d425a976c02811bd23cd0c533d2eca4e
2018-02-09cdr.c: Fix runtime leak of CDR records.Richard Mudgett
Need to remove all CDR's listed by a CDR object from the active_cdrs_all container including the root/master record. ASTERISK-27656 Change-Id: I48b4970663fea98baa262593d2204ef304aaf80e
2018-02-05Merge "manager.c: Fixed "(null):" header in AMI AsyncAGIEnd event"Jenkins2
2018-02-03Merge "manager_channels.c: Reordered ↵Jenkins2
ast_manager_build_channel_state_string_prefix()"
2018-02-01manager.c: Fixed "(null):" header in AMI AsyncAGIEnd eventSungtae Kim
* Changed to create ami_event string only when the given blob is not json_null(). * Fixed bad expression. ASTERISK-27621 Change-Id: Ice58c16361f9d9e8648261c9ed5d6c8245fb0d8f
2018-02-01manager.c: Fix potential memory leak and corruption.Richard Mudgett
ast_str_append_event_header() could potentially leak and corrupt memory if the ast_str needed to expand to add the AMI event header. * Fixed to return error if the ast_str_append() failed. Change-Id: I92f36b855540743b208d76e274152ee2d758176d
2018-02-01manager_channels.c: Reordered ast_manager_build_channel_state_string_prefix()Richard Mudgett
* Made not allocate memory if the channel snapshot is an internal channel. * Free memory earlier when no longer needed. Change-Id: Ia06e0c065f1bd095781aa3f4a626d58fa4d28b38
2018-01-31app_confbridge: Update dsp_silence_threshold and dsp_talking_threshold docs.Richard Mudgett
The dsp_talking_threshold does not represent time in milliseconds. It represents the average magnitude per sample in the audio packets. This is what the DSP uses to determine if a packet is silence or talking/noise. Change-Id: If6f939c100eb92a5ac6c21236559018eeaf58443
2018-01-31Merge "loader: Use ast_cli_completion_add for 'module load' completion."Jenkins2
2018-01-31Merge "pbx_variables.c: Misc fixes in variable substitution."Jenkins2
2018-01-30Merge "Build System: Require __sync or __atomic functions."Jenkins2
2018-01-29Merge "core: Fix unused variable error in handle_show_sysinfo."Jenkins2
2018-01-29Merge "core: Tweak startup order."Jenkins2
2018-01-29Merge "editline: Avoid shifting a negative signed value."Jenkins2
2018-01-27loader: Use ast_cli_completion_add for 'module load' completion.Corey Farrell
This addresses all performance issues with 'module load' completion. In addition to using ast_cli_completion_add we stop using libedit's filename_completion_function, instead using ast_file_read_dir. This ensures all results are produced from a single call to opendir. Change-Id: I8bf51ffaa7ef1606f3bd1b5bb13f1905d72c6134
2018-01-27core: Fix unused variable error in handle_show_sysinfo.Alexander Traud
The previous fix broke the case HAVE_SYSINFO = no HAVE_SYSCTL = yes HAVE_SWAPCTL = no which occurs on FreeBSD 11.1 for example. ASTERISK-26563 Change-Id: If77c39bc75f0b83a6c8a24ecb2fa69be8846160a
2018-01-27editline: Avoid shifting a negative signed value.Alexander Traud
clang 4.0 warned about this. ASTERISK-27630 Change-Id: Ie2725048c661c1792d8b1d498575144350b6e9ba
2018-01-25core: Tweak startup order.Corey Farrell
Move initialization of units which do not require configuration to occur before preload modules. This leaves only units which load config between module preload and regular load stages. Change-Id: I1d15384acad16a22c3498124421af474fa517478
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
2018-01-25loader: Correct overly strict startup checks.Corey Farrell
The code which handled loading modules had too many situations which would result in halting Asterisk startup. Treat most errors as declines instead of failures. The exception is when the module load function returns AST_MODULE_LOAD_FAILURE or an invalid code. Clear the missingdeps vector when appropriate to ensure the next loop starts clean. ASTERISK-27620 Change-Id: I45547d9641fd45bd86d80250224417625631ad84
2018-01-22Merge "loader: Add support for built-in modules."Jenkins2
2018-01-22Merge "loader: Rework load_resource_list."Jenkins2