You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2006/02/01 02:36:54 UTC

Re: svn commit: r18307 - trunk/subversion/libsvn_ra_serf

On Tue, Jan 31, 2006 at 08:17:04PM -0600, jerenkrantz@tigris.org wrote:
> Author: jerenkrantz
>...
> +++ trunk/subversion/libsvn_ra_serf/serf.c	Tue Jan 31 20:17:03 2006
>...
> +/**
> + * This function will deliver a PROP_CTX PROPFIND request in the SESS
> + * serf context for the properties listed in LOOKUP_PROPS at URL for
> + * DEPTH ("0","1","infinity").
> + *
> + * This function will not block waiting for the response.  Instead, the
> + * caller is expected to call context_run and wait for the PROP_CTX->done
> + * flag to be set.
> + */
>  static svn_error_t *
> -retrieve_props (apr_hash_t **prop_vals,
> -                serf_session_t *sess,
> -                const char *url,
> -                const char *depth,
> -                const dav_props_t *props,
> -                apr_pool_t *pool)
> +deliver_props (propfind_context_t **prop_ctx,
> +               apr_hash_t *prop_vals,
> +               serf_session_t *sess,
> +               const char *url,
> +               const char *depth,
> +               const dav_props_t *lookup_props,
> +               apr_pool_t *pool)

I'd suggest interpreting lookup_props to mean, "look up <these>
properties; otherwise, if NULL, then fetch all properties."

That should simplify things within the function an the callers.

>...
> +/**
> + * This helper function will block until the PROP_CTX indicates that is done
> + * or another error is returned.
> + */
> +static svn_error_t *
> +wait_for_props(propfind_context_t *prop_ctx,
> +               serf_session_t *sess,
> +               apr_pool_t *pool)

Seems that you could make a generic blocking function that takes a
pointer to a boolean.

>...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r18307 - trunk/subversion/libsvn_ra_serf

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 1/31/06, Greg Stein <gs...@lyra.org> wrote:
> I'd suggest interpreting lookup_props to mean, "look up <these>
> properties; otherwise, if NULL, then fetch all properties."
>
> That should simplify things within the function an the callers.

I saw that was how ra_dav does it, but something strikes me as funny with that.

*shrug*

> Seems that you could make a generic blocking function that takes a
> pointer to a boolean.

*light bulb*

To a pointer to a...what you said.  *ping*  I kept writing that loop
and getting annoyed at cut-and-pasting that code over and over.  I
don't know why I didn't hit on the pointer to the boolean thingy.

Thanks.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org