[Asterisk-code-review] core: Remove non-critical cleanup from startup aborts. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Sat Mar 10 08:32:35 CST 2018


Hello Jenkins2, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/8500

to look at the new patch set (#2).

Change subject: core: Remove non-critical cleanup from startup aborts.
......................................................................

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
---
M include/asterisk/_private.h
M main/asterisk.c
M main/cel.c
M main/core_local.c
M main/devicestate.c
M main/dns_core.c
M main/dns_system_resolver.c
M main/dsp.c
M main/features.c
M main/features_config.c
M main/indications.c
M main/media_cache.c
M main/pbx_builtins.c
M main/sorcery.c
14 files changed, 33 insertions(+), 70 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/00/8500/2
-- 
To view, visit https://gerrit.asterisk.org/8500
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iecc2df98008b21509925ff16740bd5fa29527db3
Gerrit-Change-Number: 8500
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180310/a5c2f121/attachment.html>


More information about the asterisk-code-review mailing list