summaryrefslogtreecommitdiff
path: root/ext/msql/php_msql.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-02-05 15:16:12 +0000
committerZeev Suraski <zeev@php.net>2000-02-05 15:16:12 +0000
commit3a816341f9f4ffa39b088424d78f967fa0118118 (patch)
tree7056708e26424e2611e600c3ff6966a7511e9d4e /ext/msql/php_msql.c
parent9f51f154aa5e40baabd3b605675edef5772778a8 (diff)
downloadphp-git-3a816341f9f4ffa39b088424d78f967fa0118118.tar.gz
Cleanup patches
Diffstat (limited to 'ext/msql/php_msql.c')
-rw-r--r--ext/msql/php_msql.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c
index 49971ba627..8701b692ee 100644
--- a/ext/msql/php_msql.c
+++ b/ext/msql/php_msql.c
@@ -217,6 +217,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
char *hashed_details;
int hashed_details_length;
int msql;
+ ELS_FETCH();
switch(ARG_COUNT(ht)) {
case 0: /* defaults */
@@ -260,7 +261,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
}
/* try to find if we already have this link in our persistent list */
- if (zend_hash_find(plist, hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */
+ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */
list_entry new_le;
/* create the link */
@@ -272,7 +273,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
/* hash it up */
new_le.type = msql_globals.le_plink;
new_le.ptr = (void *) msql;
- if (zend_hash_update(plist, hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) {
+ if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) {
efree(hashed_details);
RETURN_FALSE;
}
@@ -289,7 +290,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
if (msql_stat(le->ptr)==NULL) { /* the link died */
if (msql_connect(le->ptr,host,user,passwd)==NULL) {
php_error(E_WARNING,"mSQL link lost, unable to reconnect");
- zend_hash_del(plist,hashed_details,hashed_details_length+1);
+ zend_hash_del(&EG(persistent_list),hashed_details,hashed_details_length+1);
efree(hashed_details);
RETURN_FALSE;
}
@@ -306,7 +307,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
* if it doesn't, open a new msql link, add it to the resource list,
* and add a pointer to it with hashed_details as the key.
*/
- if (zend_hash_find(list,hashed_details,hashed_details_length+1,(void **) &index_ptr)==SUCCESS) {
+ if (zend_hash_find(&EG(regular_list),hashed_details,hashed_details_length+1,(void **) &index_ptr)==SUCCESS) {
int type,link;
void *ptr;
@@ -321,7 +322,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
efree(hashed_details);
return;
} else {
- zend_hash_del(list,hashed_details,hashed_details_length+1);
+ zend_hash_del(&EG(regular_list),hashed_details,hashed_details_length+1);
}
}
if (msql_globals.max_links!=-1 && msql_globals.num_links>=msql_globals.max_links) {
@@ -340,7 +341,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
/* add it to the hash */
new_index_ptr.ptr = (void *) return_value->value.lval;
new_index_ptr.type = le_index_ptr;
- if (zend_hash_update(list,hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) {
+ if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) {
efree(hashed_details);
RETURN_FALSE;
}