Subject: Re: Thread safety issues

Re: Thread safety issues

From: Jose Baars <peut_at_peut.org>
Date: Mon, 30 Aug 2010 13:57:47 +0200

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

I have not done any further investigation into if or how this would really
affect
use of it in a multithreaded environment, but use of static variables in a
multithreaded environment is commonly not regarded as a good thing.
...
static int _libssh2_initialized = 0;
static int _libssh2_init_flags = 0;

LIBSSH2_API int
libssh2_init(int flags)
{
...

Jose

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-08-30