cURL / Mailing Lists / curl-library / Single Mail

curl-library

Does the share interface work?

From: Andy Serpa <ac_at_onehorseshy.com>
Date: Tue, 24 Feb 2004 22:57:57 -0500

I noticed that some docs were updated per earlier message on this
list regarding the share interface. But the question is -- does it
work?

I get a crash when I try to share an easy handle. Even with the doc
updates, there is still no mention of the CURLOPT_SHARE option in the
 curl_easy_setopt() docs. In the curl_share overview it says to pass
the share handle as a parameter to share an easy handle. But I can't
get it to work.

Here's what I'm doing (pseudo-code):

err = curl_global_init()

shareH = curl_share_init()

err = curl_share_setopt(shareH,CURLSHOPT_SHARE,CURL_LOCK_DATA_COOKIE)
err = curl_share_setopt(shareH,CURLSHOPT_SHARE,CURL_LOCK_DATA_DNS)

So far, so good. A handle is returned, and no errors on the option
setting. Moving on:

easyH = curl_easy_init()

err = curl_easy_setopt(easyH,CURLOPT_SHARE,shareH)

*** CRASH ***

???
Received on 2004-02-25