From: Rodrigo Ramírez Norambuena Date: Wed, 10 Feb 2016 02:13:07 +0000 (-0300) Subject: res_config_pgsql: Show error message in reload if not connected. X-Git-Tag: 14.0.0-beta1~401^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd668670b5de29554780ad9ccec3cce7c2fdcb93;p=thirdparty%2Fasterisk.git res_config_pgsql: Show error message in reload if not connected. Change-Id: I9290115a1aaadb589eb1d02eaeb502eec01b31fa --- diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index d0e01bc8d4..77c52aa0b6 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -1351,6 +1351,9 @@ static int parse_config(int is_reload) config = ast_config_load(RES_CONFIG_PGSQL_CONF, config_flags); if (config == CONFIG_STATUS_FILEUNCHANGED) { + if (is_reload && pgsqlConn && PQstatus(pgsqlConn) != CONNECTION_OK) { + ast_log(LOG_WARNING, "PostgreSQL RealTime: Not connected\n"); + } return 0; }