|
|
|
@ -62,7 +62,7 @@ PHP_FUNCTION(curl_multi_init) |
|
|
|
mh = ecalloc(1, sizeof(php_curlm)); |
|
|
|
mh->multi = curl_multi_init(); |
|
|
|
|
|
|
|
zend_llist_init(&(*mh).easyh, sizeof(zval *), (llist_dtor_func_t) ZVAL_PTR_DTOR, 0); |
|
|
|
zend_llist_init(&mh->easyh, sizeof(zval *), (llist_dtor_func_t) ZVAL_PTR_DTOR, 0); |
|
|
|
|
|
|
|
ZEND_REGISTER_RESOURCE(return_value, mh, le_curl_multi_handle); |
|
|
|
} |
|
|
|
@ -89,7 +89,7 @@ PHP_FUNCTION(curl_multi_add_handle) |
|
|
|
_php_curl_cleanup_handle(ch); |
|
|
|
ch->uses++; |
|
|
|
|
|
|
|
zend_llist_add_element(&(*mh).easyh, &z_ch); |
|
|
|
zend_llist_add_element(&mh->easyh, &z_ch); |
|
|
|
|
|
|
|
RETURN_LONG((long) curl_multi_add_handle(mh->multi, ch->cp)); |
|
|
|
} |
|
|
|
@ -256,7 +256,7 @@ void _php_curl_multi_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) |
|
|
|
php_curlm *mh = (php_curlm *) rsrc->ptr; |
|
|
|
if (mh) { |
|
|
|
curl_multi_cleanup(mh->multi); |
|
|
|
zend_llist_clean(&(*mh).easyh); |
|
|
|
zend_llist_clean(&mh->easyh); |
|
|
|
efree(mh); |
|
|
|
rsrc->ptr = NULL; |
|
|
|
} |
|
|
|
|