[asterisk-bugs] [Asterisk 0014145]: Unexpected message "One or more of the parameters in the config does not pass our validity checks."

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Dec 29 07:21:16 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14145 
====================================================================== 
Reported By:                Spaze
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14145
Category:                   Resources/res_config_pgsql
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.0.1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-12-28 10:44 CST
Last Modified:              2008-12-29 07:21 CST
====================================================================== 
Summary:                    Unexpected message "One or more of the parameters in
the config does not pass our validity checks."
Description: 
Hello. It is my first try to understand what's happens so please don't
punish me :)

So, I'm running on the Asterisk 1.6.0.1 and try to use the Realtime. 
Everything is working fine but I can see the following message in the
DEBUG logs:

DEBUG[10871] PostgreSQL RealTime: One or more of the parameters in the
config does not pass our validity checks.

The cdr_pgsql.conf is as follows:

[global]
hostname=localhost
port=5432
dbname=ast
password=123
user=asterisk
table=cdr

I have opened the source file and tried to perform a little investigation.
I've found that unmatching the following condition:

" if ((!pgsqlConn) && (!ast_strlen_zero(dbhost) ||
!ast_strlen_zero(dbsock)) && !ast_strlen_zero(dbuser) &&
!ast_strlen_zero(my_database)) {"

leads to log message generating. I've perform a little debug and stuck on
this piece: 
"if ((!pgsqlConn) {"

What it is checking?  condition 

"if (pgsqlConn && PQstatus(pgsqlConn) != CONNECTION_OK) {
                PQfinish(pgsqlConn);
                pgsqlConn = NULL;
        }"

is OK, we are getting "CONNECTION_OK" message, so why are you using 
" if ((!pgsqlConn) {} " structure? As far I understand it checks if
connection is OK or not.
Perhaps it is worth to use "if ((pgsqlConn) {}" instead? It is very
strange, I haven't found any complains on this message... 
====================================================================== 

---------------------------------------------------------------------- 
 (0096977) Corydon76 (administrator) - 2008-12-29 07:21
 http://bugs.digium.com/view.php?id=14145#c96977 
---------------------------------------------------------------------- 
Debug messages are intended for use by the programmer and are not errors,
warnings, or other messages you need to be concerned with. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-29 07:21 Corydon76      Note Added: 0096977                          
======================================================================




More information about the asterisk-bugs mailing list