cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: AIX multithreaded problem in CURLE_SSL_CONNECT_ERROR,why?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 16 Nov 2004 09:47:34 +0100 (CET)

On Tue, 16 Nov 2004, hzhijun wrote:

> i think it maybe no need to set the OpenSSL multithread-callbacks for
> locking in my program since i only use easy curl handle in multithread
> program,and my callback function set by
> curl_easy_setopt(CURLOPT_WRITEFUNCTION) use the memory realloced by each
> thread seperately.

Did you really read that OpenSSL page? Allow me to quote a little piece:

   "locking_function... is needed to perform locking on shared data structures.
   (Note that OpenSSL uses a number of global data structures that will be
   implicitly shared whenever multiple threads use OpenSSL.) Multi-threaded
   applications will crash at random if it is not set."

I would say you are FORCED to adhere to this if you want things to work.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-11-16