> -----Original Message-----
> From: cmpilato_at_apache.org [mailto:cmpilato_at_apache.org]
> Sent: vrijdag 8 juni 2012 18:00
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1348130 -
> /subversion/trunk/subversion/libsvn_ra_serf/util.c
>
> Author: cmpilato
> Date: Fri Jun 8 16:00:26 2012
> New Revision: 1348130
>
> URL: http://svn.apache.org/viewvc?rev=1348130&view=rev
> Log:
> * subversion/libsvn_ra_serf/util.c
> (start_xml, end_xml, cdata_xml): Wrapper APR_EOF errors returned
> from the editor implementations with
> SVN_ERR_RA_SERF_WRAPPED_ERROR
> so those errors can be distinguished from EOF's in the *network
> stream* by higher layers.
>
> Modified:
> subversion/trunk/subversion/libsvn_ra_serf/util.c
>
> Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/
> util.c?rev=1348130&r1=1348129&r2=1348130&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/util.c Fri Jun 8 16:00:26
> 2012
> @@ -1200,6 +1200,7 @@ start_xml(void *userData, const char *ra
> svn_ra_serf__xml_parser_t *parser = userData;
> svn_ra_serf__dav_props_t name;
> apr_pool_t *scratch_pool;
> + svn_error_t *err;
>
> if (parser->error)
> return;
> @@ -1214,7 +1215,11 @@ start_xml(void *userData, const char *ra
>
> svn_ra_serf__expand_ns(&name, parser->state->ns_list, raw_name);
>
> - parser->error = parser->start(parser, name, attrs, scratch_pool);
> + err = parser->start(parser, name, attrs, scratch_pool);
> + if (err && APR_STATUS_IS_EOF(err->apr_err))
I know it is ugly but maybe you should use !SERF_BUCKET_READ_ERROR() instead of just APR_EOF. This should handle all specialized serf errors.
Maybe we can hide the ugliness by wrapping it as SVN_RA_SERF__SHOULD_SPECIALIZE_ERROR() or something.
(I know I did use this macro in some earlier serf work)
Bert
Received on 2012-06-10 00:17:19 CEST