subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1860958 - /subversion/trunk/subversion/svnserve/serve.c
Date Mon, 10 Jun 2019 16:02:23 GMT
Author: julianfoad
Date: Mon Jun 10 16:02:23 2019
New Revision: 1860958

URL: http://svn.apache.org/viewvc?rev=1860958&view=rev
Log:
In svnserve, consistently handle errors in opening a repository.

These errors are still logged and reported to the client, as they were
before, but now it is done in the same way as everywhere else. (The error
logging now happens higher up the call stack.)

* subversion/svnserve/serve.c
  After reporting an error to the client, don't log it explicity here and
  then clear it; instead return it so the caller can do so.

Modified:
    subversion/trunk/subversion/svnserve/serve.c

Modified: subversion/trunk/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve.c?rev=1860958&r1=1860957&r2=1860958&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/serve.c (original)
+++ subversion/trunk/subversion/svnserve/serve.c Mon Jun 10 16:02:23 2019
@@ -4138,7 +4138,7 @@ construct_server_baton(server_baton_t **
                        serve_params_t *params,
                        apr_pool_t *scratch_pool)
 {
-  svn_error_t *err, *io_err;
+  svn_error_t *err;
   apr_uint64_t ver;
   const char *client_url, *ra_client_string, *client_string;
   svn_ra_svn__list_t *caplist;
@@ -4280,11 +4280,12 @@ construct_server_baton(server_baton_t **
     }
   if (err)
     {
-      log_error(err, b);
-      io_err = svn_ra_svn__write_cmd_failure(conn, scratch_pool, err);
-      svn_error_clear(err);
-      SVN_ERR(io_err);
-      return svn_ra_svn__flush(conn, scratch_pool);
+      /* Report these errors to the client before closing the connection. */
+      err = svn_error_compose_create(err,
+              svn_ra_svn__write_cmd_failure(conn, scratch_pool, err));
+      err = svn_error_compose_create(err,
+              svn_ra_svn__flush(conn, scratch_pool));
+      return err;
     }
 
   SVN_ERR(svn_fs_get_uuid(b->repository->fs, &b->repository->uuid,



Mime
View raw message