cvs: php4 /ext/pgsql pgsql.c

From: Date: Thu, 24 Jan 2002 06:40:10 +0000
Subject: cvs: php4 /ext/pgsql pgsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9145@lists.php.net to get a copy of this message
yohgaki Thu Jan 24 01:40:10 2002 EDT Modified files: /php4/ext/pgsql pgsql.c Log: Add a little more fault tolerance for pg_host, pg_tty and more. Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.143 php4/ext/pgsql/pgsql.c:1.144 --- php4/ext/pgsql/pgsql.c:1.143 Thu Jan 24 01:20:33 2002 +++ php4/ext/pgsql/pgsql.c Thu Jan 24 01:40:10 2002 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.143 2002/01/24 06:20:33 yohgaki Exp $ */ +/* $Id: pgsql.c,v 1.144 2002/01/24 06:40:10 yohgaki Exp $ */ #include <stdlib.h> @@ -721,6 +721,9 @@ ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, "PostgreSQL link", le_link, le_plink); + if (PQstatus(pgsql) != CONNECTION_OK) { + PQreset(pgsql); + } switch(entry_type) { case PHP_PG_DBNAME: Z_STRVAL_P(return_value) = PQdb(pgsql);

« previous php.cvs (#9145) next »