On Mon, 1 Mar 2010, Lars Nordin wrote:
> I think there should exist a libssh2_init(), where all necessary initialized
> are done. Maybe to be backward compatible libssh2_init can be called in
> session_init() if sone configurations-option is used (--with
> implicit_init??)
>
> I don't know right now what shall be done in libssh2_exit, but an init-call
> should be ended with an exit-call.
I too think we need to have an init function - as the crypto libs need global
inits. It might even so so that the init functions that init OpenSSL or gcrypt
are not even thread safe (iirc) so we need to document that properly - if that
is indeed the case.
The exit/cleanup function would do the reverse of the init function, as
OpenSSL for example allocates data in their init calls that can be cleaned up
afterwards when nothing else is using it anymore.
-- / daniel.haxx.se _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2010-03-01