summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
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-19core: Remove dead symbols from asterisk.exports.in.Corey Farrell
* dahdi_chan_name * dahdi_chan_name_len * dahdi_chan_mode * __manager_event * dialed_interface_info Added comment about __progname and environ being needed for FreeBSD to prevent accidental removal in the future. Change-Id: I3ae026bc541cd9cb572be2ffa95fc359547642b5
2018-03-19Merge "loader: Convert reload_classes to built-in modules."Jenkins2
2018-03-19Merge "main/cdr: Use ast_cli_completion_add for CDR channel completion."Jenkins2
2018-03-16Merge "astobj2_container: Use ast_cli_completion_add for container names."Joshua Colp
2018-03-16Merge "main/ccss: Use ast_cli_completion_add for core id."Jenkins2
2018-03-16Merge "main/channel: Use ast_cli_completion_add for channeltypes."Jenkins2
2018-03-15main/cdr: Use ast_cli_completion_add for CDR channel completion.Corey Farrell
Change-Id: Ie81830647a23aad61c1162583b6d50adbe6e7822
2018-03-15main/ccss: Use ast_cli_completion_add for core id.Corey Farrell
Change-Id: I44b25d6d24c7d9bc1bb38a50774b38883162f98f
2018-03-15astobj2_container: Use ast_cli_completion_add for container names.Corey Farrell
Change-Id: I4f0fc09e820eb8d8da2354a177dbcf503c56ddd1
2018-03-15main/channel: Use ast_cli_completion_add for channeltypes.Corey Farrell
Change-Id: Ia845fae6a84801cc7d9996767b99efb2753cbb48
2018-03-15cli: Enable ast_cli_completion_add on public completion generators.Corey Farrell
* ast_cli_complete * ast_complete_channels * ast_complete_applications These generators will now use ast_cli_completion_add if state == -1. Change-Id: I7ff311f0873099be0e43a3dc5415c0cd06d15756
2018-03-14Merge "core: Remove incorrect usage of attribute_malloc."Jenkins2
2018-03-14Merge "core: Remove non-critical cleanup from startup aborts."Jenkins2
2018-03-14loader: Convert reload_classes to built-in modules.Corey Farrell
* acl (named_acl.c) * cdr * cel * ccss * dnsmgr * dsp * enum * extconfig (config.c) * features * http * indications * logger * manager * plc * sounds * udptl These modules are now loaded at appropriate time by the module loader. Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so the module loader will abort startup on failure of these modules. Some of these modules are still initialized or shutdown from outside the module loader. logger.c is initialized very early and shutdown very late, manager.c is initialized by the module loader but is shutdown by the Asterisk core (too much uses it without holding references). Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
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-03-13Merge "core: Remove ABI effects of MALLOC_DEBUG."Jenkins2
2018-03-13core: Remove non-critical cleanup from startup aborts.Corey Farrell
When built-in components of Asterisk fail to start they cause the Asterisk startup to abort. In these cases only the most critical cleanup should be performed - closing databases and terminating proceses. These cleanups are registered using ast_register_atexit, all other cleanups should not be run during startup abort. The main reason for this change is that these cleanup procedures are untestable from the partially initialized states, if they fail it could prevent us from ever running the critical cleanup with ast_run_atexits. Create separate initialization for dns_core.c to be run unconditionally during startup instead of being initialized by the first dns resolver to be registered. This ensures that 'sched' is initialized before it can be potentially used. Replace ast_register_atexit with ast_register_cleanup in media_cache.c. There is no reason for this cleanup to happen unconditionally. Change-Id: Iecc2df98008b21509925ff16740bd5fa29527db3
2018-03-12Merge "Replace direct checks of option_debug with DEBUG_ATLEAST macro."Jenkins2
2018-03-07Replace direct checks of option_debug with DEBUG_ATLEAST macro.Corey Farrell
Checking option_debug directly is incorrect as it ignores file/module specific debug settings. This system-wide change replaces nearly all direct checks for option_debug with the DEBUG_ATLEAST macro. Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0
2018-03-07utils: In Solaris, avoid a warning about an unused variable.Alexander Traud
When HAVE_GETHOSTBYNAME_R_5 was set by the script ./configure, GCC 7.3.0 found an unused variable. Actually, the variable was used (set to a dummy value) but the compiler optimization might have removed that. Instead, this change ensures that the variable 'res' is only used when it is really required. Change-Id: Ic3ea23ccf84ac4bc2d501b514985b989030abab5
2018-03-06Merge "BuildSystem: Cast any intptr_t explicitly to its proposed type."Jenkins2
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