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

Re: credential caching and pool/session lifetime errors

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-11-17 01:42:08 CET

Greg Hudson <ghudson@MIT.EDU> writes:

> On Sun, 2003-11-16 at 19:02, Philip Martin wrote:
>> Should svn_auth_first_credentials be using the auth baton pool?
>
> Yes. (That may require changing the provider interface.)

This appears to do the trick

Index: subversion/libsvn_subr/auth.c
===================================================================
--- subversion/libsvn_subr/auth.c (revision 7771)
+++ subversion/libsvn_subr/auth.c (working copy)
@@ -210,19 +210,19 @@
   else
     {
       /* Build an abstract iteration state. */
- iterstate = apr_pcalloc (pool, sizeof(*iterstate));
+ iterstate = apr_pcalloc (auth_baton->pool, sizeof(*iterstate));
       iterstate->table = table;
       iterstate->provider_idx = i;
       iterstate->got_first = got_first;
       iterstate->provider_iter_baton = iter_baton;
- iterstate->realmstring = apr_pstrdup (pool, realmstring);
- iterstate->cache_key = cache_key;
+ iterstate->realmstring = apr_pstrdup (auth_baton->pool, realmstring);
+ iterstate->cache_key = apr_pstrdup (auth_baton->pool, cache_key);
       iterstate->auth_baton = auth_baton;
       *state = iterstate;
 
       /* Put the creds in the cache */
       apr_hash_set(auth_baton->creds_cache,
- cache_key, APR_HASH_KEY_STRING,
+ iterstate->cache_key, APR_HASH_KEY_STRING,
                    creds);
     }
 

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 17 01:43:08 2003

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.