fix test 5 to pass

This commit is contained in:
Daniela Mariaschi 2002-05-09 21:41:20 +00:00
parent 0c7cfcda4f
commit f7d5d1036c

View File

@ -478,19 +478,23 @@ static void _php_ibase_free_trans(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
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);
}
/* }}} */