]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_config_pgsql: Show error message in reload if not connected. 26/2226/3
authorRodrigo Ramírez Norambuena <a@rodrigoramirez.com>
Wed, 10 Feb 2016 02:13:07 +0000 (23:13 -0300)
committerRodrigo Ramírez Norambuena <a@rodrigoramirez.com>
Wed, 10 Feb 2016 17:41:09 +0000 (14:41 -0300)
Change-Id: I9290115a1aaadb589eb1d02eaeb502eec01b31fa

res/res_config_pgsql.c

index d0e01bc8d49465c9292aba1f4e7d0104e8589401..77c52aa0b631cc8773d83fb57bd304604b6dde32 100644 (file)
@@ -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;
        }