asterisk/main
Corey Farrell fee929c8ac core: Remove non-critical cleanup from startup aborts.
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-13 13:46:08 -04:00
..
stdtime Merge "BuildSystem: Cast any intptr_t explicitly to its proposed type." 2018-03-06 13:17:54 -06:00
.gitignore build-system: Allow building with static pjproject 2016-03-01 09:30:43 -07:00
Makefile core: Remove embedded editline. 2018-02-12 04:44:26 -05:00
abstract_jb.c abstract_jb: Remove silly usage of RAII_VAR. 2017-11-20 14:03:25 -06:00
acl.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
adsi.c Allow Asterisk to compile under GCC 4.10 2014-05-09 22:49:26 +00:00
alaw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
alertpipe.c utils: Add convenience function for setting fd flags 2017-12-08 13:28:04 -06:00
aoc.c aoc: Remove silly usage of RAII_VAR. 2017-11-20 14:05:25 -06:00
app.c loader: Create ast_module_running_ref. 2018-01-03 17:23:36 -05:00
ast_expr2.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
ast_expr2.fl Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ast_expr2.h Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
ast_expr2.y Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
ast_expr2f.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
asterisk.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
asterisk.dynamics Fix error loading res_monitor. 2014-04-23 15:02:39 +00:00
asterisk.exports.in pjproject_bundled: Various fixes discovered during testing of OSes 2016-05-03 07:56:18 -05:00
astfd.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
astmm.c Fix Common Typo's. 2017-12-20 12:40:01 -05:00
astobj2.c Fix Common Typo's. 2017-12-20 12:40:01 -05:00
astobj2_container.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
astobj2_container_private.h Astobj2: Allow reference debugging to be enabled/disabled by config. 2015-04-27 18:37:26 -04:00
astobj2_hash.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
astobj2_private.h Astobj2: Allow reference debugging to be enabled/disabled by config. 2015-04-27 18:37:26 -04:00
astobj2_rbtree.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
audiohook.c audiohook.c: Fix freeing a frame and still using it. 2017-11-15 17:07:07 -05:00
autochan.c autochan/mixmonitor/chanspy: Fix unsafe channel locking and references. 2017-03-15 17:18:55 -06:00
autoservice.c core: Reduce video update queueing. 2017-08-28 11:12:50 -05:00
backtrace.c backtrace: Avoid potential spurious output. 2018-02-10 14:55:42 +01:00
bridge.c loader: Create ast_module_running_ref. 2018-01-03 17:23:36 -05:00
bridge_after.c stasis/control: Fix possible deadlock with swap channel 2017-09-06 13:00:49 -05:00
bridge_basic.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
bridge_channel.c bridge : Fix one-way direct-media when early bridging with native_rtp 2017-09-20 10:19:37 -05:00
bridge_roles.c bridge_roles: Use a non-locking linked list where appropriate 2018-02-15 14:31:32 -06:00
bucket.c core: Use macros to generate ao2_container callbacks where possible. 2017-12-30 13:20:16 -05:00
buildinfo.c fix a few small things found by using sparse 2008-10-30 16:49:02 +00:00
callerid.c Replace direct checks of option_debug with DEBUG_ATLEAST macro. 2018-03-07 16:03:01 -06:00
ccss.c core: Use macros to generate ao2_container callbacks where possible. 2017-12-30 13:20:16 -05:00
cdr.c cdr.c: Fix runtime leak of CDR records. 2018-02-09 14:26:46 -06:00
cel.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
channel.c AST-2018-001: rtp / channel: Don't allow an unnegotiated format to be passed up. 2018-02-21 08:27:51 -06:00
channel_internal_api.c core: Remove 'Data Retrieval API' 2017-07-05 11:25:58 -05:00
chanvars.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
cli.c loader: Create ast_module_running_ref. 2018-01-03 17:23:36 -05:00
codec.c core: Use macros to generate ao2_container callbacks where possible. 2017-12-30 13:20:16 -05:00
codec_builtin.c core: Add VP9 passthrough support. 2017-07-24 18:30:59 +00:00
config.c Replace direct checks of option_debug with DEBUG_ATLEAST macro. 2018-03-07 16:03:01 -06:00
config_options.c aco: Fix NULL dereference in error path. 2018-01-04 10:27:44 -05:00
conversions.c core/conversions: Added string to unsigned integer and long conversions 2017-05-17 17:41:11 -05:00
core_local.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
core_unreal.c core: Reduce video update queueing. 2017-08-28 11:12:50 -05:00
crypt.c BuildSystem: Fix build on FreeBSD due to missing crypt.h 2017-06-08 10:42:54 -05:00
cygload.c Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
datastore.c datastore: Add automatic module references. 2017-12-29 16:16:11 -05:00
db.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
devicestate.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
dial.c channel: Remove old epoll support and fixed max number of file descriptors. 2017-03-27 19:54:44 +00:00
dns.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
dns_core.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
dns_naptr.c Add support for older name resolving version libraries like openBSD 2016-11-20 09:19:18 +11:00
dns_query_set.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_recurring.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_srv.c Add support for older name resolving version libraries like openBSD 2016-11-20 09:19:18 +11:00
dns_system_resolver.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
dns_test.c dns: Fix build when TEST_FRAMEWORK is not defined. 2015-04-10 13:32:24 +00:00
dns_tlsa.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dnsmgr.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dsp.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
ecdisa.h Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
endpoints.c core: Use macros to generate ao2_container callbacks where possible. 2017-12-30 13:20:16 -05:00
enum.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
event.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
features.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
features_config.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
file.c loader: Create ast_module_running_ref. 2018-01-03 17:23:36 -05:00
fixedjitterbuf.c abstract/fixed/adpative jitter buffer: disallow frame re-inserts 2017-01-17 17:08:53 -06:00
fixedjitterbuf.h abstract/fixed/adpative jitter buffer: disallow frame re-inserts 2017-01-17 17:08:53 -06:00
format.c core: Use macros to generate ao2_container callbacks where possible. 2017-12-30 13:20:16 -05:00
format_cache.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
format_cap.c format_cap: Fix leak on AST_VECTOR_APPEND error. 2017-11-06 16:07:01 -05:00
format_compatibility.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
frame.c Merge "core: Add cache_media_frames debugging option." 2017-11-14 06:56:54 -06:00
framehook.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
fskmodem.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
fskmodem_float.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
fskmodem_int.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
global_datastores.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
hashtab.c hashtab: Use ast_free. 2017-10-23 20:25:19 -04:00
heap.c heap.c: No need to calloc heap pointer array. 2017-09-28 15:49:50 -05:00
http.c http.c: Fix http header send content. 2017-10-25 10:36:21 -05:00
image.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
indications.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
io.c Core: Add support for systemd socket activation. 2017-06-19 13:33:48 -04:00
iostream.c utils: Add convenience function for setting fd flags 2017-12-08 13:28:04 -06:00
jitterbuf.c Fix Common Typo's. 2017-12-20 12:40:01 -05:00
json.c json: Add conditionals to avoid locking if Jansson is thread safe. 2018-02-12 13:27:08 -05:00
libasteriskpj.c PJPROJECT logging: Fix detection of max supported log level. 2017-01-24 11:25:19 -06:00
libasteriskssl.c Build: Fix issues building without SSL. 2017-11-19 14:27:25 -06:00
libasteriskssl.exports.in Address OpenSSL initialization issues when using third-party libraries. 2012-01-30 21:21:16 +00:00
loader.c manager: Add AMI event Load/Unload 2018-02-12 21:34:09 +01:00
lock.c Single API for ast_store_lock_info and ast_remove_lock_info. 2017-10-24 16:11:39 -04:00
logger.c logger: Added logger_queue_limit to the configuration options. 2017-05-08 16:49:13 -05:00
manager.c manager.c: Fix lseek() parameter order. 2018-02-21 12:56:41 -06:00
manager_bridges.c res/ari/resource_bridges: Add the ability to manipulate the video source 2016-11-14 17:03:09 -05:00
manager_channels.c manager_channels.c: Reordered ast_manager_build_channel_state_string_prefix() 2018-02-01 12:28:32 -06:00
manager_endpoints.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
manager_mwi.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
manager_system.c Remove constant conditionals (dead-code). 2017-12-19 09:42:19 -05:00
max_forwards.c Detect potential forwarding loops based on count. 2015-04-17 15:58:07 -05:00
md5.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
media_cache.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
media_index.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
message.c Messaging: Report error on failure to register tech or handler. 2017-11-06 16:10:56 -05:00
mixmonitor.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
named_acl.c core: Use macros to generate ao2_container callbacks where possible. 2017-12-30 13:20:16 -05:00
named_locks.c core: Use macros to generate ao2_container callbacks where possible. 2017-12-30 13:20:16 -05:00
netsock2.c Replace direct checks of option_debug with DEBUG_ATLEAST macro. 2018-03-07 16:03:01 -06:00
optional_api.c optional_api: Refactor to use vector's and standard allocators. 2018-02-12 22:53:35 -05:00
parking.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx.c Replace direct checks of option_debug with DEBUG_ATLEAST macro. 2018-03-07 16:03:01 -06:00
pbx_app.c Core/PBX: Deadlock between dialplan execution and application unregistration. 2017-06-16 13:26:22 -05:00
pbx_builtins.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
pbx_functions.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_hangup_handler.c cli: Fix various CLI documentation and completion issues 2017-02-13 11:33:15 -05:00
pbx_ignorepat.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_include.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_private.h pbx: Create pbx_sw.c for management of 'struct ast_sw'. 2016-07-21 13:58:26 -04:00
pbx_sw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
pbx_switch.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_timing.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_variables.c pbx_variables.c: Misc fixes in variable substitution. 2018-01-22 12:38:13 -06:00
pickup.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
plc.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
poll.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
presencestate.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
privacy.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
rtp_engine.c AST-2018-001: rtp / channel: Don't allow an unnegotiated format to be passed up. 2018-02-21 08:27:51 -06:00
say.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
sched.c Replace direct checks of option_debug with DEBUG_ATLEAST macro. 2018-03-07 16:03:01 -06:00
sdp.c core: Fix multiple trivial issues in the core. 2017-12-19 00:36:24 -05:00
sdp_options.c SDP: Rework SDP offer/answer model and update capabilities merges. 2017-06-20 18:15:52 -05:00
sdp_private.h SDP: Rework SDP offer/answer model and update capabilities merges. 2017-06-20 18:15:52 -05:00
sdp_srtp.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
sdp_state.c ice: Increase foundation buffer size 2017-12-31 11:34:41 -05:00
sdp_translator.c SDP: Make SDP translation to/from internal representation more const. 2017-04-27 19:08:05 -05:00
security_events.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
sem.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
sha1.c Doxygen Updates - janitor work 2012-09-21 17:14:59 +00:00
sip_api.c Don't make chan_sip export global symbols. 2012-10-11 15:49:02 +00:00
slinfactory.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
smoother.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
sorcery.c core: Remove non-critical cleanup from startup aborts. 2018-03-13 13:46:08 -04:00
sounds.c core: Rename sounds_index.c to sounds.c. 2018-02-19 04:21:23 -06:00
srv.c srv: Fix crash when ast_srv_lookup is used and 0 records are returned. 2017-02-07 12:13:23 -06:00
stasis.c stasis: Remove silly usage of RAII_VAR. 2018-01-10 16:09:50 -06:00
stasis_bridges.c stasis_bridges: Remove silly usage of RAII_VAR. 2018-01-09 21:20:02 -06:00
stasis_cache.c stasis_cache: Remove silly usage of RAII_VAR. 2018-01-09 20:43:17 -06:00
stasis_cache_pattern.c stasis_cache_pattern: Remove silly usage of RAII_VAR. 2018-01-10 16:01:17 -06:00
stasis_channels.c stasis_channels.c: Misc cleanup. 2017-12-28 13:53:27 -06:00
stasis_endpoints.c stasis_endpoints: Remove silly usage of RAII_VAR. 2018-01-09 20:36:52 -06:00
stasis_message.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis_message_router.c stasis_message_router: Remove silly usage of RAII_VAR. 2018-01-09 18:55:46 -06:00
stasis_system.c stasis_system: Remove silly usage of RAII_VAR. 2018-01-09 18:55:06 -06:00
strcompat.c Add builtin roundf() for systems lacking it. 2013-01-19 20:54:07 +00:00
stream.c stream: Return error from ast_stream_topology_set_stream. 2017-11-07 11:28:53 -05:00
stringfields.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
strings.c vector: Additional string vector definitions. 2018-01-15 13:25:45 -05:00
stun.c STUN/netsock2: Fix some valgrind uninitialized memory findings. 2017-08-10 14:38:12 -05:00
syslog.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
taskprocessor.c taskprocessor.c: Increase the number of tps_singletons container buckets. 2018-01-16 12:42:06 -06:00
tcptls.c utils: Add convenience function for setting fd flags 2017-12-08 13:28:04 -06:00
tdd.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
term.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test.c unittests: Add a unit test that causes a SEGV and... 2017-05-24 15:58:18 -05:00
threadpool.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
threadstorage.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
timing.c loader: Create ast_module_running_ref. 2018-01-03 17:23:36 -05:00
translate.c translate: Avoid absolute value on unsigned substraction. 2018-01-09 11:37:08 -05:00
udptl.c aco: Minimize use of regex. 2017-12-15 10:14:31 -05:00
ulaw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
uri.c uri: Quiet warning about type qualifiers ignored on function return type 2014-08-21 14:42:12 +00:00
utils.c utils: In Solaris, avoid a warning about an unused variable. 2018-03-07 16:32:05 +01:00
uuid.c Fix printf problems with high ascii characters after r413586 (1.8). 2014-12-17 10:23:32 +00:00
xml.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
xmldoc.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00