cvs: php4 /ext/interbase interbase.c
| From: | Daniela Mariaschi | Date: | Thu, 09 May 2002 21:41:21 +0000 |
| Subject: | cvs: php4 /ext/interbase interbase.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11788@lists.php.net to get a copy of this message | ||
daniela Thu May 9 17:41:21 2002 EDT
Modified files:
/php4/ext/interbase interbase.c
Log:
fix test 5 to pass
Index: php4/ext/interbase/interbase.c
diff -u php4/ext/interbase/interbase.c:1.82 php4/ext/interbase/interbase.c:1.83
--- php4/ext/interbase/interbase.c:1.82 Wed Apr 3 21:15:47 2002
+++ php4/ext/interbase/interbase.c Thu May 9 17:41:20 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.82 2002/04/04 02:15:47 daniela Exp $ */
+/* $Id: interbase.c,v 1.83 2002/05/09 21:41:20 daniela Exp $ */
/* TODO: Arrays, roles?
@@ -478,19 +478,23 @@
{
ibase_tr_link *ib_trans = (ibase_tr_link *)rsrc->ptr;
ibase_db_link *ib_link;
+ int type;
+ void *ptr;
- ib_link = (ibase_db_link *) zend_fetch_resource(NULL TSRMLS_CC, ib_trans->link_rsrc,
"InterBase link", NULL, 2, le_link, le_plink);
+ ptr = zend_list_find(ib_trans->link_rsrc, &type); /* check if the link is still there */
+ if (ptr && (type==le_link || type==le_plink)) {
+ ib_link = (ibase_db_link *) zend_fetch_resource(NULL TSRMLS_CC, ib_trans->link_rsrc,
"InterBase link", NULL, 2, le_link, le_plink);
- if (ib_link) {
- if (ib_link->trans[ib_trans->trans_num] != NULL) {
- IBDEBUG("Rolling back unhandled transaction...");
- if (isc_rollback_transaction(IB_STATUS, &ib_link->trans[ib_trans->trans_num])) {
- _php_ibase_error();
+ if (ib_link) {
+ if (ib_link->trans[ib_trans->trans_num] != NULL) {
+ IBDEBUG("Rolling back unhandled transaction...");
+ if (isc_rollback_transaction(IB_STATUS, &ib_link->trans[ib_trans->trans_num])) {
+ _php_ibase_error();
+ }
+ ib_link->trans[ib_trans->trans_num] = NULL;
}
- ib_link->trans[ib_trans->trans_num] = NULL;
}
- }
-
+ }
efree(ib_trans);
}
/* }}} */
@@ -604,7 +608,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.82 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.83 $");
#ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "yes");
#endif