On Mon, 30 Aug 2010, Jose Baars wrote:

Wouldn't the libssh2_init function be one of the prime suspects? This function was added in libssh2 1.2.7.

Quoted from the man page for libssh2_init():

       It uses a global state, and is not thread safe  --  you  must
       make sure this function is not called concurrently.

... and before anyone questions the reasoning for this let me exaplain that the underlying libraries (OpenSSL or libgcrypt) both have non thread-safe init functions themselves that libssh2 need to use.

Thus, 1.2.7 is actually more thread-safe than previously as now it offers a way for the app to do these things in a controlled manner.

--

 / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to