cvs: php4 /ext/fbsql php_fbsql.c

From: Date: Wed, 04 Sep 2002 04:24:54 +0000
Subject: cvs: php4 /ext/fbsql php_fbsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13814@lists.php.net to get a copy of this message
kalowsky Wed Sep 4 00:24:54 2002 EDT Modified files: /php4/ext/fbsql php_fbsql.c Log: Fix for bug #19155 UNTESTED. Unfortunately I don't have a way to test it hopefully the user will. Index: php4/ext/fbsql/php_fbsql.c diff -u php4/ext/fbsql/php_fbsql.c:1.83 php4/ext/fbsql/php_fbsql.c:1.84 --- php4/ext/fbsql/php_fbsql.c:1.83 Tue Sep 3 23:57:59 2002 +++ php4/ext/fbsql/php_fbsql.c Wed Sep 4 00:24:54 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fbsql.c,v 1.83 2002/09/04 03:57:59 kalowsky Exp $ */ +/* $Id: php_fbsql.c,v 1.84 2002/09/04 04:24:54 kalowsky Exp $ */ /* TODO: * @@ -673,7 +673,8 @@ { PHPFBLink* phpLink = NULL; zval **fbsql_link_index = NULL; - int id; + int id, i, nument, type; + void *ptr; switch (ZEND_NUM_ARGS()) { case 0: @@ -691,6 +692,19 @@ break; } ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, id, "FrontBase-Link", le_link, le_plink); + + nument = zend_hash_next_free_element(&EG(regular_list)); + for (i = 1; i < nument; i++) { + ptr = zend_list_find(i, &type); + if (ptr && (type == le_result)) { + PHPFBResult *result; + + result = (PHPFBResult *)ptr; + if (result->link == phpLink) { + zend_list_delete(i); + } + } + } if (id==-1) { /* explicit resource number */ zend_list_delete(Z_RESVAL_PP(fbsql_link_index));

« previous php.cvs (#13814) next »