> -----Original Message-----
> From: danielsh_at_apache.org [mailto:danielsh_at_apache.org]
> Sent: dinsdag 9 juli 2013 04:38
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1501049 - in /subversion/trunk/subversion:
> include/svn_error_codes.h libsvn_ra_serf/util_error.c
>
> Author: danielsh
> Date: Tue Jul 9 02:37:50 2013
> New Revision: 1501049
>
> URL: http://svn.apache.org/r1501049
> Log:
> ra_serf: Do not return a serf apr_status_t.
>
> For me, this manifested as the following error chain (with the patch already
> applied; before the patch, 120171 was the only code in the chain):
>
> % $svn info https://svn-us.apache.org/repos/asf
> subversion/svn/info-cmd.c:663,
> subversion/libsvn_client/info.c:300,
> subversion/libsvn_client/ra.c:516,
> subversion/libsvn_client/ra.c:393,
> subversion/libsvn_ra/ra_loader.c:482:
> (apr_err=SVN_ERR_RA_SERF_WRAPPED_ERROR)
> svn: E230003: Unable to connect to a repository at URL 'https://svn-
> us.apache.org/repos/asf'
> subversion/libsvn_ra_serf/serf.c:506,
> subversion/libsvn_ra_serf/options.c:508,
> subversion/libsvn_ra_serf/util.c:817,
> subversion/libsvn_ra_serf/util.c:784:
> (apr_err=SVN_ERR_RA_SERF_WRAPPED_ERROR)
> svn: E230003: Error running context: An error occurred during SSL
> communication
> subversion/libsvn_ra_serf/util.c:784: (apr_err=120171)
> svn: E120171: APR does not understand this error code
>
> In that, 120171 is SERF_ERROR_SSL_COMM_FAILED, which is not a useful
> value for
> svn_error_t->apr_err (API users can't do anything with it).
>
>
> * subversion/include/svn_error_codes.h
> (SVN_ERR_RA_SERF_WRAPPED_ERROR): Warn about non-standard
> semantics to be
> expected in presence of this error code.
>
> * subversion/libsvn_ra_serf/util_error.c
> (svn_ra_serf__wrap_err): Wrap the serf error code by a Subversion one.
>
> Modified:
> subversion/trunk/subversion/include/svn_error_codes.h
> subversion/trunk/subversion/libsvn_ra_serf/util_error.c
>
> Modified: subversion/trunk/subversion/include/svn_error_codes.h
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_er
> ror_codes.h?rev=1501049&r1=1501048&r2=1501049&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/include/svn_error_codes.h (original)
> +++ subversion/trunk/subversion/include/svn_error_codes.h Tue Jul 9
> 02:37:50 2013
> @@ -1512,7 +1512,10 @@ SVN_ERROR_START
> SVN_ERR_RA_SERF_CATEGORY_START + 2,
> "Initialization of the GSSAPI context failed")
>
> - /** @since New in 1.7. */
> + /** @since New in 1.7.
> + * @note When @c svn_error_t.apr_err is set to this,
> + * @c svn_error_t.child->apr_err is a serf error code, not a Subversion
> + * one! */
> SVN_ERRDEF(SVN_ERR_RA_SERF_WRAPPED_ERROR,
> SVN_ERR_RA_SERF_CATEGORY_START + 3,
> "While handling serf response:")
>
> Modified: subversion/trunk/subversion/libsvn_ra_serf/util_error.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/
> util_error.c?rev=1501049&r1=1501048&r2=1501049&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_ra_serf/util_error.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/util_error.c Tue Jul 9
> 02:37:50 2013
> @@ -61,6 +61,7 @@ svn_ra_serf__wrap_err(apr_status_t statu
>
> if (serf_err_msg)
> {
> + err = svn_error_create(SVN_ERR_RA_SERF_WRAPPED_ERROR, err,
> NULL);
> err_msg = serf_err_msg;
> }
> else
This is most likely the wrong fix for the problem you see.
The serf wrapped error handling is usually just used to return errors like APR_EOF that would be handled as a broken/closing connection if we returned them directly. Serf error codes should be passed through normally, but should set an error message when converted to an svn_error_t.
In some cases we have to return an apr_status to serf, but in those cases we keep the true error in a state/context variable to allow returning that when the context loop ends.
Bert
Received on 2013-07-09 11:22:00 CEST