cvs: pear /PECL/session_pgsql session_pgsql.c
| From: | Yasuo Ohgaki | Date: | Mon, 07 Jan 2002 09:16:09 +0000 |
| Subject: | cvs: pear /PECL/session_pgsql session_pgsql.c | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1865@lists.php.net to get a copy of this message | ||
yohgaki Mon Jan 7 04:16:09 2002 EDT
Modified files:
/pear/PECL/session_pgsql session_pgsql.c
Log:
More meaningful error messages
Index: pear/PECL/session_pgsql/session_pgsql.c
diff -u pear/PECL/session_pgsql/session_pgsql.c:1.7 pear/PECL/session_pgsql/session_pgsql.c:1.8
--- pear/PECL/session_pgsql/session_pgsql.c:1.7 Mon Jan 7 03:55:13 2002
+++ pear/PECL/session_pgsql/session_pgsql.c Mon Jan 7 04:16:09 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session_pgsql.c,v 1.7 2002/01/07 08:55:13 yohgaki Exp $ */
+/* $Id: session_pgsql.c,v 1.8 2002/01/07 09:16:09 yohgaki Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -188,13 +188,13 @@
if (PS_PGSQL(pgsql_link) == NULL || PQstatus(PS_PGSQL(pgsql_link)) == CONNECTION_BAD) {
/* link is bad... Try again */
if (php_ps_pgsql_connect(PS(save_path)) == FAILURE) {
- php_error(E_NOTICE,"Failed at OPEN. Link is bad.");
+ php_error(E_NOTICE,"Session pgsql OPEN failed. Link is bad.");
ret = FAILURE;
}
}
pg_result = PQexec(PS_PGSQL(pgsql_link), "BEGIN;");
if (PQresultStatus(pg_result) != PGRES_COMMAND_OK) {
- php_error(E_NOTICE,"Failed at OPEN. Transaction cannot be started.");
+ php_error(E_NOTICE,"Session pgsql OPEN failed. Transaction cannot be started.");
ret = FAILURE;
}
PQclear(pg_result);
@@ -209,13 +209,13 @@
ELOG("CLOSE Called");
*mod_data = (void *)0; /* mod_data should be set to NULL to avoid additional close call */
if (PS_PGSQL(pgsql_link) == NULL || PQstatus(PS_PGSQL(pgsql_link)) == CONNECTION_BAD) {
- php_error(E_NOTICE,"Failed at CLOSE. Bad connection");
+ php_error(E_NOTICE,"Session pgsql CLOSE failed. Bad connection");
return FAILURE;
}
pg_result = PQexec(PS_PGSQL(pgsql_link), "END;");
if (PQresultStatus(pg_result) != PGRES_COMMAND_OK) {
- php_error(E_NOTICE,"Failed at CLOSE. Transaction cannot be finished.");
+ php_error(E_NOTICE,"Session pgsql CLOSE failed. Transaction cannot be finished.");
ret = FAILURE;
}
PQclear(pg_result);
@@ -235,7 +235,7 @@
ELOG("READ Called");
if (PS_PGSQL(pgsql_link) == NULL || PQstatus(PS_PGSQL(pgsql_link)) == CONNECTION_BAD) {
- php_error(E_NOTICE,"Failed at READ. Bad connection");
+ php_error(E_NOTICE,"Session pgsql READ failed. Bad connection");
return FAILURE;
}
PS_PGSQL(sess_new) = 0;
@@ -299,7 +299,7 @@
ELOG("WRITE Called");
if (PS_PGSQL(pgsql_link) == NULL || PQstatus(PS_PGSQL(pgsql_link)) == CONNECTION_BAD) {
- php_error(E_NOTICE,"Failed at WRITE. Bad connection");
+ php_error(E_NOTICE,"Session pgsql WRITE failed. Bad connection");
return FAILURE;
}
if (PS_PGSQL(sess_del)) {
@@ -350,7 +350,7 @@
ELOG("DESTROY Called");
if (PS_PGSQL(pgsql_link) == NULL || PQstatus(PS_PGSQL(pgsql_link)) == CONNECTION_BAD) {
- php_error(E_NOTICE,"Failed at DESTROY. Bad connection");
+ php_error(E_NOTICE,"Session pgsql DESTROY failed. Bad connection");
return FAILURE;
}
@@ -378,7 +378,7 @@
ELOG("GC Called");
if (PS_PGSQL(pgsql_link) == NULL || PQstatus(PS_PGSQL(pgsql_link)) == CONNECTION_BAD) {
- php_error(E_NOTICE,"Failed at GC. Bad connection");
+ php_error(E_NOTICE,"Sessin pgsql GC failed. Bad connection");
return FAILURE;
}