aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_config_pgsql.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_config_pgsql.c')
-rw-r--r--res/res_config_pgsql.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c
index 579334af5..ee31b48ef 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");