[asterisk-bugs] [JIRA] (ASTERISK-24817) init_logger_chain: unreachable code block

Corey Farrell (JIRA) noreply at issues.asterisk.org
Sat Mar 14 16:28:34 CDT 2015


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Corey Farrell updated ASTERISK-24817:
-------------------------------------

    Reviewboard Link: https://reviewboard.asterisk.org/r/4497/
            Assignee: Corey Farrell

I've thought of this more.  If we're going to apply default console logger when logger.conf fails at startup, then we also need to replace existing logger channels during reload.  This is needed since the reload process is expected to close and reopen logger channels on the assumption that log files were rotated.  If we're going to deal with missing logger.conf at startup, we have to deal with situations where someone had a logger.conf at startup, then intentionally deleted it.

> init_logger_chain: unreachable code block
> -----------------------------------------
>
>                 Key: ASTERISK-24817
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24817
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Logging
>    Affects Versions: SVN, 11.16.0, 13.2.0
>            Reporter: Corey Farrell
>            Assignee: Corey Farrell
>            Severity: Minor
>         Attachments: logger-unreachable.patch
>
>
> init_logger_chain returns immediately if logger.conf was not found or for parse errors.  Later the procedure has an unreachable block that would set default console logging if no config was found.
> In 11 and 13 I think the console logger should be applied if logger.conf is missing or invalid during startup only.  During failed reload we should just return as it does now.
> In trunk I think this should be a fatal error during startup, and the unreachable code should be removed.  Failed reload's should continue to be a no-op.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list