projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
provide RTLD_LAZY compatibility
[m6w6/ext-http]
/
php_http_client_curl.c
diff --git
a/php_http_client_curl.c
b/php_http_client_curl.c
index 9b44aa00d1129b506d86787393e36735fa4f7749..b91fe4837467b829bd15d38c7e463ffb7b2ac9f0 100644
(file)
--- a/
php_http_client_curl.c
+++ b/
php_http_client_curl.c
@@
-2136,16
+2136,13
@@
static php_resource_factory_t *create_rf(php_http_client_t *h, php_http_client_e
}
/* only if the client itself is setup for persistence */
}
/* only if the client itself is setup for persistence */
- if (
h->rf->dtor == (void (*)(void*)) php_persistent_handle_abandon
) {
+ if (
php_resource_factory_is_persistent(h->rf)
) {
zend_string *id;
char *id_str = NULL;
size_t id_len;
int port = url->port ? url->port : 80;
zval *zport;
zend_string *id;
char *id_str = NULL;
size_t id_len;
int port = url->port ? url->port : 80;
zval *zport;
- id_len = spprintf(&id_str, 0, "%s:%d", STR_PTR(url->host), url->port ? url->port : 80);
- id = php_http_cs2zs(id_str, id_len);
-
if ((zport = zend_hash_str_find(enqueue->options, ZEND_STRL("port")))) {
zend_long lport = zval_get_long(zport);
if ((zport = zend_hash_str_find(enqueue->options, ZEND_STRL("port")))) {
zend_long lport = zval_get_long(zport);
@@
-2155,12
+2152,13
@@
static php_resource_factory_t *create_rf(php_http_client_t *h, php_http_client_e
}
id_len = spprintf(&id_str, 0, "%s:%d", STR_PTR(url->host), port);
}
id_len = spprintf(&id_str, 0, "%s:%d", STR_PTR(url->host), port);
+ id = php_http_cs2zs(id_str, id_len);
pf = php_persistent_handle_concede(NULL, PHP_HTTP_G->client.curl.driver.request_name, id, NULL, NULL);
zend_string_release(id);
}
if (pf) {
pf = php_persistent_handle_concede(NULL, PHP_HTTP_G->client.curl.driver.request_name, id, NULL, NULL);
zend_string_release(id);
}
if (pf) {
- rf = php_
resource_factory_init(NULL, php_persistent_handle_get_resource_factory_ops(), pf, (void (*)(void*)) php_persistent_handle_abandon
);
+ rf = php_
persistent_handle_resource_factory_init(NULL, pf
);
} else {
rf = php_resource_factory_init(NULL, &php_http_curle_resource_factory_ops, NULL, NULL);
}
} else {
rf = php_resource_factory_init(NULL, &php_http_curle_resource_factory_ops, NULL, NULL);
}