diff options
author | Frank M. Kromann <fmk@php.net> | 2001-05-22 17:32:17 +0000 |
---|---|---|
committer | Frank M. Kromann <fmk@php.net> | 2001-05-22 17:32:17 +0000 |
commit | 6b2df64cf0bbb5c1890f37e5b7dfeee777a54eb3 (patch) | |
tree | 4bc1fd30bf9f465d488f6c81a25f06144d89f372 /ext/fbsql | |
parent | e88dd1ac996351785bf52fcbcefe440d6a505085 (diff) | |
download | php-git-6b2df64cf0bbb5c1890f37e5b7dfeee777a54eb3.tar.gz |
Changing how persistant links are added to zend_lists
Diffstat (limited to 'ext/fbsql')
-rw-r--r-- | ext/fbsql/php_fbsql.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index 8841f544ea..e3899e4d21 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -563,14 +563,15 @@ PHPFBLink* phpfbConnect(INTERNAL_FUNCTION_PARAMETERS, char *hostName, char *user result->results = NULL; le.ptr = result; - le.type = le_link; + le.type = persistant?le_plink:le_link; if (zend_hash_update(persistant?&EG(persistent_list):&EG(regular_list), name, strlen(name), &le, sizeof(le), NULL)==FAILURE) { /* phpfbReleaseLink(result); */ return NULL; } - result->index = zend_list_insert (phpfbRetainLink(result), le_link); + result->index = zend_list_insert (phpfbRetainLink(result), le.type); FB_SQL_G(linkCount)++; + if (persistant) FB_SQL_G(persistantCount)++; } return result; } @@ -658,7 +659,7 @@ PHPFBLink* phpfbGetLink(int id) { php_error(E_WARNING,"FrontBase has no default connection"); } - else if ((!(phpLink = (PHPFBLink*) zend_list_find (id,&type))) || ((type != le_link))) + else if ((!(phpLink = (PHPFBLink*) zend_list_find (id,&type))) || ((type != le_link && type != le_plink))) { php_error(E_WARNING,"%d is not a FBSQL link index",id); phpLink = NULL; |