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

Re: svn commit: r13436 - branches/locking/subversion/libsvn_client

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-03-16 22:27:54 CET

lundblad@tigris.org writes:

> Author: lundblad
> Date: Wed Mar 16 13:05:35 2005
> New Revision: 13436

> +static svn_error_t *
> +fetch_tokens (svn_ra_session_t *ra_session, apr_hash_t *path_tokens,
> + apr_pool_t *pool)
> +{
> + apr_hash_index_t *hi;
> + apr_pool_t *iterpool = svn_pool_create (pool);
>
> + for (hi = apr_hash_first (pool, path_tokens); hi; hi = apr_hash_next (hi))
> + {
> + const void *key;
> + const char *path;
> + svn_lock_t *lock;
> +
> + svn_pool_clear (iterpool);
> + apr_hash_this (hi, &key, NULL, NULL);
> + path = key;
> +
> + svn_ra_get_lock (ra_session, &lock, path, iterpool);

Ignores/leaks the returned svn_error_t.

> +
> + if (! lock)
> + return svn_error_createf
> + (SVN_ERR_CLIENT_MISSING_LOCK_TOKEN, NULL,
> + _("'%s' is not locked"), path);
> +
> + apr_hash_set (path_tokens, path, APR_HASH_KEY_STRING,
> + apr_pstrdup (pool, lock->token));
> + }
> +
> + svn_pool_destroy (iterpool);
> + return SVN_NO_ERROR;
> +}

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 16 22:29:06 2005

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.