cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Does the share interface work?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 25 Feb 2004 13:28:19 +0100 (CET)

On Tue, 24 Feb 2004, Andy Serpa wrote:

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

It does. Test case 506 uses the share interface and that test case runs fine
on numerous platforms all the time.

There are very likely still some bugs lurking in there though!

> 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.

I've added it now.

> 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 ***

Enable debug. Run it with a debugger. Tell us why/where it crashes. This
doesn't happen for me.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-02-25