[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: RFC: TLS support in svn protocol

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-07-28 20:53:42 CEST

On Wed, 2004-07-28 at 13:04, Ben Reser wrote:
> Uhh no. You can't do stuff like that. It is perfectly valid for a
> app to want to use multiple sets of our libraries directly. If
> svn_client_init() calls the init functions for its dependencies and the
> app uses some of our other libs then the init function has been called
> more than once, which I don't believe is what you want.

Generally if a library has an initialization calls, it is the library's
responsibility to cope if it is initialized more than once, at least
within a single-threaded environment. But of course we have to worry
about practice as well as theory.

APR will let you call the initialization function more than once, and
holds a refcount so that if you init N times, you have to terminate N
times before it cleans up. So, it's important not to call
apr_initialize() from several threads simultaneously, but calling it
from several libraries in the single-threaded environment is fine.

Neon makes multiple calls to ne_sock_init() idempotent. So, as long as
you've called ne_sock_init from the single-threaded environment, you can
call it again as often as you want.

OpenSSL is... a bit of a puzzle. It has no coherent API documentation,
and the implementation of SSL_library_init() has no obvious protections,
but the lower-level functions like EVP_add_cipher might be idempotent.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 28 21:31:29 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.