cvs: /php4/ext/sybase_ct php_sybase_ct.c

From: Date: Tue, 12 Oct 1999 15:00:12 +0000
Subject: cvs: /php4/ext/sybase_ct php_sybase_ct.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-5508@lists.php.net to get a copy of this message
thies Tue Oct 12 11:00:12 1999 EDT Modified files: /php4/ext/sybase_ct php_sybase_ct.c Log: (php sybase_close) fixed obvious bug. Index: php4/ext/sybase_ct/php_sybase_ct.c diff -u php4/ext/sybase_ct/php_sybase_ct.c:1.5 php4/ext/sybase_ct/php_sybase_ct.c:1.6 --- php4/ext/sybase_ct/php_sybase_ct.c:1.5 Tue Oct 12 10:53:12 1999 +++ php4/ext/sybase_ct/php_sybase_ct.c Tue Oct 12 11:00:10 1999 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_ct.c,v 1.5 1999/10/12 14:53:12 thies Exp $ */ +/* $Id: php_sybase_ct.c,v 1.6 1999/10/12 15:00:10 thies Exp $ */ #include "php.h" @@ -623,7 +623,7 @@ PHP_FUNCTION(sybase_close) { - pval *sybase_link_index; + pval *sybase_link_index = 0; int id; sybase_link *sybase_ptr; @@ -642,10 +642,13 @@ break; } - ZEND_FETCH_RESOURCE2(sybase_ptr, sybase_link *, &sybase_link_index, id, "Sybase-Link", sybase_globals.le_link, sybase_globals.le_plink); - zend_list_delete(id); /* XXX this IS A BUG!!!! */ + if (sybase_link_index) { + zend_list_delete(sybase_link_index->value.lval); + } else { + zend_list_delete(id); + } RETURN_TRUE; } @@ -1561,3 +1564,10 @@ #endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + */

« previous php.version4 (#5508) next »