]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Log exactly why we can't open the database, if we fail (closes issue #10887)
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 5 Oct 2007 19:42:21 +0000 (19:42 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 5 Oct 2007 19:42:21 +0000 (19:42 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84851 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/db.c

index f4eafc87fcd072a2f2816ffb11e5f8a2bc0ebe62..0b0a424bf11eceb3b0202176ea34cc0c0248be4c 100644 (file)
--- a/main/db.c
+++ b/main/db.c
@@ -63,7 +63,7 @@ AST_MUTEX_DEFINE_STATIC(dblock);
 static int dbinit(void) 
 {
        if (!astdb && !(astdb = dbopen((char *)ast_config_AST_DB, O_CREAT | O_RDWR, 0664, DB_BTREE, NULL))) {
-               ast_log(LOG_WARNING, "Unable to open Asterisk database\n");
+               ast_log(LOG_WARNING, "Unable to open Asterisk database '%s': %s\n", ast_config_AST_DB, strerror(errno));
                return -1;
        }
        return 0;