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

Re: svn commit: r1552324 - Introduce svn_ra_session_dup()

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 20 Dec 2013 12:12:28 +0000 (GMT)

> URL: http://svn.apache.org/r1552324
[...]

> Modified: subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
> ==============================================================================
> struct svn_ra_serf__session_t {
>    /* Pool for allocations during this session */
>    apr_pool_t *pool;
> +  apr_hash_t *config; /* For duplicating */
>
>    /* The current context */
>    serf_context_t *context;
>
> Modified: subversion/trunk/subversion/libsvn_ra_serf/serf.c
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_serf/serf.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/serf.c Thu Dec 19 16:09:26 2013
> @@ -494,6 +494,7 @@ svn_ra_serf__open(svn_ra_session_t *sess
>
>    serf_sess = apr_pcalloc(pool, sizeof(*serf_sess));
>    serf_sess->pool = svn_pool_create(pool);
> +  serf_sess->config = config;

Is this safe -- storing the old pointer to 'config' ...

> @@ -598,6 +599,181 @@
> +/* Implements svn_ra__vtable_t.dup_session */
> +static svn_error_t *
> +ra_serf_dup_session(svn_ra_session_t *new_session,
> +                    svn_ra_session_t *old_session,
> +                    const char *new_session_url,
> +                    apr_pool_t *result_pool,
> +                    apr_pool_t *scratch_pool)
> +{
[...]
> +  SVN_ERR(load_config(new_sess, old_sess->config, result_pool));

... and then using it later? I don't see any lifetime guarantee.

- Julian
Received on 2013-12-20 13:13:29 CET

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.