diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/res_config_pgsql.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index 4d0f16c2c..aecff9b58 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -720,7 +720,9 @@ static int parse_config(void) 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"); |