2008-05-28 14:43:37 Senthil Kumaran S napisaĆ(a):
> Index: subversion/libsvn_subr/cmdline.c
> ===================================================================
> --- subversion/libsvn_subr/cmdline.c (revision 31488)
> +++ subversion/libsvn_subr/cmdline.c (working copy)
> @@ -391,6 +391,43 @@
> svn_error_clear(err);
> return ret;
> }
> +
> +/* Dynamically load authentication ssl client cert password provider. */
> +static svn_boolean_t
> +get_auth_ssl_client_cert_pw_provider(svn_auth_provider_object_t **provider,
> + const char *provider_name,
> + apr_pool_t *pool)
> +{
> + apr_dso_handle_t *dso;
> + apr_dso_handle_sym_t symbol;
> + const char *libname;
> + const char *funcname;
> + svn_error_t *err;
> + svn_boolean_t ret = FALSE;
> + libname = apr_psprintf(pool,
> + "libsvn_auth_%s-%d.so.0",
> + provider_name,
> + SVN_VER_MAJOR);
> + funcname = apr_psprintf(pool,
> + "svn_auth_get_%s_ssl_client_cert_pw_provider",
> + provider_name);
> + err = svn_dso_load(&dso, libname);
> + if (err == SVN_NO_ERROR)
> + {
> + if (dso)
> + {
> + if (! apr_dso_sym(&symbol, dso, funcname))
> + {
> + svn_auth_ssl_client_cert_pw_provider_func_t func;
> + func = (svn_auth_ssl_client_cert_pw_provider_func_t) symbol;
> + func(provider, pool);
> + ret = TRUE;
> + }
> + }
> + }
> + svn_error_clear(err);
> + return ret;
> +}
It would be better to pass additional 'const char *provider_type' argument to
the original function and s/get_auth_simple_provider/get_auth_provider/g.
--
Arfrever Frehtes Taifersar Arahesis
Received on 2008-05-28 20:22:08 CEST