cURL / Mailing Lists / curl-library / Single Mail


Re: problem with simultaneous sftp connections.

From: Daniel Stenberg <>
Date: Wed, 10 Aug 2011 14:40:39 +0200 (CEST)

On Wed, 10 Aug 2011, michele wrote:

> I receive the following segmentation fault when I try to send more different
> files simultaneously (via sftp):


> I noticed that, when I use OpenSSL and cURL in a multithreaded environment,
> I must define the callback void lock_function(..) and void
> unlock_function(..) in order to avoid problems like this. Is it correct?

Yes, that is correct. And chances are your libssh2 is also using OpenSSL and
needs the same mutex callbacks.

> How can I use these two callbacks?

Check out this example:

List admin:
Received on 2011-08-10