cpool_bundle_destroy((struct cpool_bundle *)freethis);
}
-int Curl_cpool_init(struct cpool *cpool,
- struct Curl_easy *idata,
- struct Curl_share *share,
- size_t size)
+void Curl_cpool_init(struct cpool *cpool,
+ struct Curl_easy *idata,
+ struct Curl_share *share,
+ size_t size)
{
Curl_hash_init(&cpool->dest2bundle, size, Curl_hash_str,
Curl_str_key_compare, cpool_bundle_free_entry);
cpool->idata = idata;
cpool->share = share;
cpool->initialised = TRUE;
- return 0; /* good */
}
/* Return the "first" connection in the pool or NULL. */
};
/* Init the pool, pass multi only if pool is owned by it.
- * returns 1 on error, 0 is fine.
+ * Cannot fail.
*/
-int Curl_cpool_init(struct cpool *cpool,
- struct Curl_easy *idata,
- struct Curl_share *share,
- size_t size);
+void Curl_cpool_init(struct cpool *cpool,
+ struct Curl_easy *idata,
+ struct Curl_share *share,
+ size_t size);
/* Destroy all connections and free all members */
void Curl_cpool_destroy(struct cpool *connc);
if(Curl_cshutdn_init(&multi->cshutdn, multi))
goto error;
- if(Curl_cpool_init(&multi->cpool, multi->admin, NULL, chashsize))
- goto error;
+ Curl_cpool_init(&multi->cpool, multi->admin, NULL, chashsize);
if(Curl_ssl_scache_create(sesssize, 2, &multi->ssl_scache))
goto error;
case CURL_LOCK_DATA_CONNECT:
/* It is safe to set this option several times on a share. */
if(!share->cpool.initialised) {
- if(Curl_cpool_init(&share->cpool, share->admin, share, 103))
- res = CURLSHE_NOMEM;
+ Curl_cpool_init(&share->cpool, share->admin, share, 103);
}
break;