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

Re: [PATCH] Client-side Cyrus SASL support

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2006-08-09 23:44:35 CEST

"Vlad Georgescu" <vgeorgescu@gmail.com> writes:

> +apr_status_t svn_ra_svn__sasl_common_init(void)
> +{
> + apr_status_t apr_err = APR_SUCCESS;
> +
> +#ifdef APR_HAS_THREADS
> + sasl_set_mutex(sasl_mutex_alloc_cb,
> + sasl_mutex_lock_cb,
> + sasl_mutex_unlock_cb,
> + sasl_mutex_free_cb);
> + sasl_pool = svn_pool_create(NULL);
> + apr_pool_cleanup_register(sasl_pool, NULL, sasl_done_cb,
> + apr_pool_cleanup_null);
> + free_mutexes = apr_array_make(sasl_pool, 0, sizeof(apr_thread_mutex_t *));
> + apr_err = apr_thread_mutex_create(&array_mutex,
> + APR_THREAD_MUTEX_DEFAULT,
> + sasl_pool);
> +#else
> + atexit(sasl_done);
> +#endif /* APR_HAS_THREADS */
> + return apr_err;
> +}

I still think it's odd for the library to use atexit, and for the
threaded/non-threaded code to be so different. Why doesn't the
non-threaded code just use the threaded code but without the mutexes?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 9 23:45:22 2006

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.