You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2010/08/05 22:47:40 UTC

svn commit: r982775 - /subversion/trunk/subversion/libsvn_ra_serf/util.c

Author: rhuijben
Date: Thu Aug  5 20:47:40 2010
New Revision: 982775

URL: http://svn.apache.org/viewvc?rev=982775&view=rev
Log:
Fix a few more places in serf where we potentially could overwrite an
existing pending error.

* subversion/libsvn_ra_serf/util.c
  (svn_ra_serf__credentials_callback): Compose errors, instead of just
    setting the pending error.

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=982775&r1=982774&r2=982775&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Thu Aug  5 20:47:40 2010
@@ -1323,7 +1323,8 @@ svn_ra_serf__credentials_callback(char *
 
       if (err)
         {
-          ctx->session->pending_error = err;
+          session->pending_error
+              = svn_error_compose_create(session->pending_error, err);
           return err->apr_err;
         }
 
@@ -1332,10 +1333,13 @@ svn_ra_serf__credentials_callback(char *
       if (!creds || session->auth_attempts > 4)
         {
           /* No more credentials. */
-          ctx->session->pending_error =
-            svn_error_create(SVN_ERR_AUTHN_FAILED, NULL,
-                             "No more credentials or we tried too many times.\n"
-                             "Authentication failed");
+          session->pending_error
+              = svn_error_compose_create(
+                    session->pending_error,
+                    svn_error_create(
+                          SVN_ERR_AUTHN_FAILED, NULL,
+                          _("No more credentials or we tried too many times.\n"
+                            "Authentication failed")));
           return SVN_ERR_AUTHN_FAILED;
         }
 
@@ -1353,9 +1357,11 @@ svn_ra_serf__credentials_callback(char *
       if (!session->proxy_username || session->proxy_auth_attempts > 4)
         {
           /* No more credentials. */
-          ctx->session->pending_error =
-            svn_error_create(SVN_ERR_AUTHN_FAILED, NULL,
-                             "Proxy authentication failed");
+          session->pending_error
+              = svn_error_compose_create(
+                      ctx->session->pending_error,
+                      svn_error_create(SVN_ERR_AUTHN_FAILED, NULL,
+                                       _("Proxy authentication failed")));
           return SVN_ERR_AUTHN_FAILED;
         }
     }