[Asterisk-code-review] res config pgsql: Show error essage in reload if not connected. (asterisk[master])
Rodrigo Ramirez Norambuena
asteriskteam at digium.com
Tue Feb 9 21:01:24 CST 2016
Rodrigo Ramirez Norambuena has uploaded a new change for review.
https://gerrit.asterisk.org/2226
Change subject: res_config_pgsql: Show error essage in reload if not connected.
......................................................................
res_config_pgsql: Show error essage in reload if not connected.
Change-Id: I9290115a1aaadb589eb1d02eaeb502eec01b31fa
---
M res/res_config_pgsql.c
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/26/2226/1
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c
index d0e01bc..4deeea7 100644
--- a/res/res_config_pgsql.c
+++ b/res/res_config_pgsql.c
@@ -1351,6 +1351,9 @@
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_ERROR, "PostgreSQL RealTime: Cannot Connect.\n");
+ }
return 0;
}
--
To view, visit https://gerrit.asterisk.org/2226
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9290115a1aaadb589eb1d02eaeb502eec01b31fa
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Rodrigo Ramirez Norambuena <a at rodrigoramirez.com>
More information about the asterisk-code-review
mailing list