Re: cvs: php4 /ext/ingres_ii ii.c

From: Date: Sat, 05 Aug 2000 09:04:22 +0000
Subject: Re: cvs: php4 /ext/ingres_ii ii.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1044@lists.php.net to get a copy of this message
How about moving ii_* to ingres_*? ii_* is really too short and not consistent with most of the database extension function names. Please change it! Andi At 03:22 AM 8/5/00 +0000, Hénot David wrote:
henot           Fri Aug  4 20:22:13 2000 EDT
Modified files:
    /php4/ext/ingres_ii ii.c
Log: Fix for a bug with persistent connections. Index: php4/ext/ingres_ii/ii.c diff -u php4/ext/ingres_ii/ii.c:1.5 php4/ext/ingres_ii/ii.c:1.6 --- php4/ext/ingres_ii/ii.c:1.5 Tue Jul 18 15:34:41 2000
+++ php4/ext/ingres_ii/ii.c     Fri Aug  4 20:22:13 2000
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: ii.c,v 1.5 2000/07/18 22:34:41 sas Exp $ */ +/* $Id: ii.c,v 1.6 2000/08/05 03:22:13 henot Exp $ */ #include "php.h" #include "php_globals.h" @@ -154,7 +154,7 @@ IIapi_disconnect(&disconnParm); - efree(link); + free(link); IIG(num_links)--; } @@ -435,7 +435,7 @@
        RETURN_FALSE;
       }
-      link = (II_LINK *) emalloc(sizeof(II_LINK));
+      link = (II_LINK *) malloc(sizeof(II_LINK));
       link->connHandle = connParm.co_connHandle;
       link->tranHandle = NULL;
       link->stmtHandle = NULL;
@@ -447,6 +447,7 @@
       new_le.ptr = link;
       if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) {
        php_error(E_WARNING,"Ingres II:  Unable to hash (%s)", hashed_details);
+       free(link);
        efree(hashed_details);
        RETURN_FALSE;
       }
@@ -516,7 +517,7 @@
        RETURN_FALSE;
       }
-      link = (II_LINK *) emalloc(sizeof(II_LINK));
+      link = (II_LINK *) malloc(sizeof(II_LINK));
       link->connHandle = connParm.co_connHandle;
       link->tranHandle = NULL;
       link->stmtHandle = NULL;
@@ -531,13 +532,14 @@
       new_index_ptr.type = le_index_ptr;
       if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1 ,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) {
        php_error(E_WARNING,"Ingres II:  Unable to hash (%s)", hashed_details);
+       free(link);
        efree(hashed_details);
        RETURN_FALSE;
       }
       IIG(num_links)++;
} - efree(hashed_details); + efree(hashed_details); php_ii_set_default_link(return_value->value.lval); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
--- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.cvs (#1044) next »