[asterisk-bugs] [Asterisk 0010887]: [patch] loge reason why DB can't be open
noreply at bugs.digium.com
noreply at bugs.digium.com
Thu Oct 4 17:06:42 CDT 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=10887
======================================================================
Reported By: dimas
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 10887
Category: Core-General
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): 1.4
SVN Revision (number only!): 84581
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 10-04-2007 15:56 CDT
Last Modified: 10-04-2007 17:06 CDT
======================================================================
Summary: [patch] loge reason why DB can't be open
Description:
when Asterisk can't open /var/lib/asterisk/astdb it logs "Unable to open
Asterisk database\n" without any information which file it tries to open
exactly and without the error.
proper error description is half of problem solution :) when you see
[Oct 5 05:01:50] WARNING[19068] db.c: Unable to open Asterisk database
/var/lib/asterisk/astdb: Permission denied
You quickly realize you forgot to change owner on /var/lib/asterisk :)
patch adds filename+strerror
======================================================================
----------------------------------------------------------------------
dimas - 10-04-07 17:06
----------------------------------------------------------------------
well, as I understand the code, if astdb is null it is the only case when
it will ever try opening the file.
If astdb is non-null, because of && sharthand operator, dbopen won't get
called and function returns zero without logging eny errors. Non-null astdb
means it is already open.
If you prefer, I rewritten the same code to be more line-consuming :) but
also more clear (on my opinion) - see dblog-2.patch
Issue History
Date Modified Username Field Change
======================================================================
10-04-07 17:06 dimas Note Added: 0071488
======================================================================
More information about the asterisk-bugs
mailing list