diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index 579334af5c..ee31b48efd 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -862,7 +862,9 @@ static int parse_config(int reload) dbport = atoi(s); } - if (!ast_strlen_zero(dbhost) && !(s = ast_variable_retrieve(config, "general", "dbsock"))) { + if (!ast_strlen_zero(dbhost)) { + /* No socket needed */ + } else if (!(s = ast_variable_retrieve(config, "general", "dbsock"))) { ast_log(LOG_WARNING, "PostgreSQL RealTime: No database socket found, using '/tmp/pgsql.sock' as default.\n"); strcpy(dbsock, "/tmp/pgsql.sock");