mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Replace direct checks of option_debug with DEBUG_ATLEAST macro.
Checking option_debug directly is incorrect as it ignores file/module specific debug settings. This system-wide change replaces nearly all direct checks for option_debug with the DEBUG_ATLEAST macro. Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0
This commit is contained in:
@@ -1528,16 +1528,16 @@ static int parse_config(int is_reload)
|
||||
|
||||
ast_config_destroy(config);
|
||||
|
||||
if (option_debug) {
|
||||
if (DEBUG_ATLEAST(1)) {
|
||||
if (!ast_strlen_zero(dbhost)) {
|
||||
ast_debug(1, "PostgreSQL RealTime Host: %s\n", dbhost);
|
||||
ast_debug(1, "PostgreSQL RealTime Port: %i\n", dbport);
|
||||
ast_log(LOG_DEBUG, "PostgreSQL RealTime Host: %s\n", dbhost);
|
||||
ast_log(LOG_DEBUG, "PostgreSQL RealTime Port: %i\n", dbport);
|
||||
} else {
|
||||
ast_debug(1, "PostgreSQL RealTime Socket: %s\n", dbsock);
|
||||
ast_log(LOG_DEBUG, "PostgreSQL RealTime Socket: %s\n", dbsock);
|
||||
}
|
||||
ast_debug(1, "PostgreSQL RealTime User: %s\n", dbuser);
|
||||
ast_debug(1, "PostgreSQL RealTime Password: %s\n", dbpass);
|
||||
ast_debug(1, "PostgreSQL RealTime DBName: %s\n", dbname);
|
||||
ast_log(LOG_DEBUG, "PostgreSQL RealTime User: %s\n", dbuser);
|
||||
ast_log(LOG_DEBUG, "PostgreSQL RealTime Password: %s\n", dbpass);
|
||||
ast_log(LOG_DEBUG, "PostgreSQL RealTime DBName: %s\n", dbname);
|
||||
}
|
||||
|
||||
if (!pgsql_reconnect(NULL)) {
|
||||
|
Reference in New Issue
Block a user