[asterisk-commits] oej: branch oej/pine-cdr-pgsql-status-1.4 r291357 - /team/oej/pine-cdr-pgsql-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 12 14:56:07 CDT 2010


Author: oej
Date: Tue Oct 12 14:56:05 2010
New Revision: 291357

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=291357
Log:
Patch by prado

Modified:
    team/oej/pine-cdr-pgsql-status-1.4/cdr/cdr_pgsql.c

Modified: team/oej/pine-cdr-pgsql-status-1.4/cdr/cdr_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-cdr-pgsql-status-1.4/cdr/cdr_pgsql.c?view=diff&rev=291357&r1=291356&r2=291357
==============================================================================
--- team/oej/pine-cdr-pgsql-status-1.4/cdr/cdr_pgsql.c (original)
+++ team/oej/pine-cdr-pgsql-status-1.4/cdr/cdr_pgsql.c Tue Oct 12 14:56:05 2010
@@ -230,6 +230,8 @@
 			if (PQstatus(conn) == CONNECTION_OK) {
 				ast_log(LOG_ERROR, "cdr_pgsql: Connection reestablished.\n");
 				connected = 1;
+				connect_time = time(NULL);
+				records = 0;
 				PQclear(result);
 				result = PQexec(conn, sqlcmd);
 				if (PQresultStatus(result) != PGRES_COMMAND_OK) {
@@ -362,6 +364,8 @@
 		if (option_debug)
 			ast_log(LOG_DEBUG, "Successfully connected to PostgreSQL database.\n");
 		connected = 1;
+		connect_time = time(NULL);
+		records = 0;
 		if (PQsetClientEncoding(conn, encoding)) {
 			ast_log(LOG_WARNING, "Failed to set encoding to '%s'.  Encoding set to default '%s'\n", encoding, pg_encoding_to_char(PQclientEncoding(conn)));
 		}




More information about the asterisk-commits mailing list