[asterisk-commits] oej: branch group/pine-cdr-pgsql-status-trunk r291356 - /team/group/pine-cdr-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 12 14:53:49 CDT 2010
Author: oej
Date: Tue Oct 12 14:53:47 2010
New Revision: 291356
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=291356
Log:
Fix some time issues. Patch by prado in issue 18009
Modified:
team/group/pine-cdr-pgsql-status-trunk/cdr/cdr_pgsql.c
Modified: team/group/pine-cdr-pgsql-status-trunk/cdr/cdr_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-cdr-pgsql-status-trunk/cdr/cdr_pgsql.c?view=diff&rev=291356&r1=291355&r2=291356
==============================================================================
--- team/group/pine-cdr-pgsql-status-trunk/cdr/cdr_pgsql.c (original)
+++ team/group/pine-cdr-pgsql-status-trunk/cdr/cdr_pgsql.c Tue Oct 12 14:53:47 2010
@@ -379,6 +379,8 @@
if (PQstatus(conn) == CONNECTION_OK) {
ast_log(LOG_ERROR, "Connection reestablished.\n");
connected = 1;
+ connect_time = time(NULL);
+ records = 0;
PQclear(result);
result = PQexec(conn, ast_str_buffer(sql));
if (PQresultStatus(result) != PGRES_COMMAND_OK) {
@@ -602,6 +604,8 @@
int i, rows, version;
ast_debug(1, "Successfully connected to PostgreSQL database.\n");
connected = 1;
+ connect_time = time(NULL);
+ records = 0;
if (PQsetClientEncoding(conn, encoding)) {
#ifdef HAVE_PGSQL_pg_encoding_to_char
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