thies Sat Feb 17 07:54:41 2001 EDT
Modified files:
/php4/ext/oci8 oci8.c
Log:
make oci work again.
Index: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.108 php4/ext/oci8/oci8.c:1.109
--- php4/ext/oci8/oci8.c:1.108 Thu Feb 15 06:48:57 2001
+++ php4/ext/oci8/oci8.c Sat Feb 17 07:54:40 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.108 2001/02/15 14:48:57 thies Exp $ */
+/* $Id: oci8.c,v 1.109 2001/02/17 15:54:40 thies Exp $ */
/* TODO list:
*
@@ -489,7 +489,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.108 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.109 $");
#ifndef PHP_WIN32
php_info_print_table_row(2, "Oracle Version", PHP_OCI8_VERSION );
php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DIR );
@@ -735,22 +735,17 @@
static ub4
oci_handle_error(oci_connection *connection, ub4 errcode)
{
- switch (errcode) {
- case 0:
- return 0;
- break;
- case 22: /* ORA-00022 Invalid session id */
- case 1012: /* ORA-01012: */
- case 3113: /* ORA-03113: end-of-file on communication channel */
- connection->open = 0;
- connection->session->open = 0;
- connection->session->server->open = 0;
- return 0;
- break;
- default:
- return 0;
- break;
- }
+ switch (errcode) {
+ case 22: /* ORA-00022 Invalid session id */
+ case 1012: /* ORA-01012: */
+ case 3113: /* ORA-03113: end-of-file on communication channel */
+ connection->open = 0;
+ connection->session->open = 0;
+ connection->session->server->open = 0;
+ return 1; /* fatal error */
+ }
+
+ return 0; /* no fatal error */
}
/* {{{ oci_error() */
@@ -1224,8 +1219,12 @@
if (statement->binds) {
zend_hash_apply(statement->binds, (int (*)(void *))
_oci_bind_post_exec);
}
+
oci_handle_error(statement->conn, statement->error);
- return 0;
+
+ if (statement->error) {
+ return 0;
+ }
}
if (stmttype == OCI_STMT_SELECT && (statement->executed == 0)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]