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

RE: svn commit: r997237 - in /subversion/trunk/subversion/bindings/javahl/native: ClientContext.cpp ClientContext.h SVNClient.cpp

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 15 Sep 2010 11:34:43 +0200

> -----Original Message-----
> From: hwright_at_apache.org [mailto:hwright_at_apache.org]
> Sent: woensdag 15 september 2010 11:18
> To: commits_at_subversion.apache.org
> Subject: svn commit: r997237 - in
> /subversion/trunk/subversion/bindings/javahl/native: ClientContext.cpp
> ClientContext.h SVNClient.cpp
>
> Author: hwright
> Date: Wed Sep 15 09:17:34 2010
> New Revision: 997237
>
> URL: http://svn.apache.org/viewvc?rev=997237&view=rev
> Log:
> Revert r997228. Apparently, some of the improved error handling added
> in that
> revision wasn't to friendly with the tests. It will require further
> digging,
> but I'm reverting in the intrim.
>
> Modified:
>
> subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp
> subversion/trunk/subversion/bindings/javahl/native/ClientContext.h
> subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
>
> Modified:
> subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javah
> l/native/ClientContext.cpp?rev=997237&r1=997236&r2=997237&view=diff
> =======================================================================
> =======
> ---
> subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp
> (original)
> +++
> subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp
> Wed Sep 15 09:17:34 2010
> @@ -97,20 +97,20 @@ ClientContext::~ClientContext()
> env->DeleteGlobalRef(m_jctx);
> }
>
> -svn_error_t *
> -ClientContext::getContext(svn_client_ctx_t **ctx, CommitMessage
> *message)
> +svn_client_ctx_t *
> +ClientContext::getContext(CommitMessage *message)
> {
> SVN::Pool *requestPool = JNIUtil::getRequestPool();
> apr_pool_t *pool = requestPool->pool();
> svn_auth_baton_t *ab;
> -
> - *ctx = persistentCtx;
> + svn_client_ctx_t *ctx = persistentCtx;
> + //SVN_JNI_ERR(svn_client_create_context(&ctx, pool), NULL);
>
> const char *configDir = m_configDir.c_str();
> if (m_configDir.length() == 0)
> configDir = NULL;
> - SVN_ERR(svn_config_get_config(&((*ctx)->config), configDir,
> pool));
> - svn_config_t *config = (svn_config_t *) apr_hash_get((*ctx)-
> >config,
> + SVN_JNI_ERR(svn_config_get_config(&(ctx->config), configDir,
> pool), NULL);
> + svn_config_t *config = (svn_config_t *) apr_hash_get(ctx->config,
>
> SVN_CONFIG_CATEGORY_CONFIG,
>
> APR_HASH_KEY_STRING);
>
> @@ -118,8 +118,10 @@ ClientContext::getContext(svn_client_ctx
> apr_array_header_t *providers;
>
> /* Populate the registered providers with the platform-specific
> providers */
> -
> SVN_ERR(svn_auth_get_platform_specific_client_providers(&providers,
> - config,
> pool));
> +
> SVN_JNI_ERR(svn_auth_get_platform_specific_client_providers(&providers,
> +
> config,
> + pool),
> + NULL);

This doesn't look right (in the old and new code). If you use a client session multiple time, you shouldn't recreate the auth baton on every invocation, but only if there is a reason to recreate.

The auth baton also handles some caching for the auth providers. (At least it stores the used passwords that weren't saved to disk, but I think it also stores some context state for a few providers)

        Bert
Received on 2010-09-15 11:36:27 CEST

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.