]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Display an error message when chan_alsa fails to load due to a missing
authorSean Bright <sean@malleable.com>
Wed, 27 May 2009 13:02:54 +0000 (13:02 +0000)
committerSean Bright <sean@malleable.com>
Wed, 27 May 2009 13:02:54 +0000 (13:02 +0000)
or inaccessible configuration file.

Before this change, when chan_alsa failed to load due to a missing or
inaccessible configuration file, no message would be displayed.  With this
change, when chan_alsa fails to load due to a missing or inaccessible
configuration file, a message will be displayed.

(closes issue #14760)
Reported by: Nick_Lewis
Patches:
      chan_alsa.c-confload.patch uploaded by Nick (license 657)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196988 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_alsa.c

index 520ef940a67b81655a506bc9daff404eaa34e42b..e1fe2b3fe2db19ec464924ec89b001729a53a7b7 100644 (file)
@@ -863,6 +863,7 @@ static int load_module(void)
        strcpy(mohinterpret, "default");
 
        if (!(cfg = ast_config_load(config, config_flags))) {
+               ast_log(LOG_ERROR, "Unable to read ALSA configuration file %s.  Aborting.\n", config);
                return AST_MODULE_LOAD_DECLINE;
        } else if (cfg == CONFIG_STATUS_FILEINVALID) {
                ast_log(LOG_ERROR, "%s is in an invalid format.  Aborting.\n", config);