Author: stsp Date: Fri Aug 16 06:02:53 2019 New Revision: 1865266 URL: http://svn.apache.org/viewvc?rev=1865266&view=rev Log: * subversion/mod_dav_svn/repos.c (get_resource): Following up on r1850651: Set cleanup handler for FS warning logging regardless of presence of R->USER.
Patch by: sergey.raevskiy{_AT_}visualsvn.com Modified: subversion/trunk/subversion/mod_dav_svn/repos.c Modified: subversion/trunk/subversion/mod_dav_svn/repos.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/repos.c?rev=1865266&r1=1865265&r2=1865266&view=diff ============================================================================== --- subversion/trunk/subversion/mod_dav_svn/repos.c (original) +++ subversion/trunk/subversion/mod_dav_svn/repos.c Fri Aug 16 06:02:53 2019 @@ -2514,6 +2514,14 @@ get_resource(request_rec *r, /* capture warnings during cleanup of the FS */ svn_fs_set_warning_func(repos->fs, log_warning_req, r); + /* We must degrade the logging context when the request is freed. */ + cleanup_req_logging_baton = + apr_pcalloc(r->pool, sizeof(*cleanup_req_logging_baton)); + cleanup_req_logging_baton->fs = repos->fs; + cleanup_req_logging_baton->connection = r->connection; + apr_pool_pre_cleanup_register(r->pool, cleanup_req_logging_baton, + cleanup_req_logging); + /* if an authenticated username is present, attach it to the FS */ if (r->user) { @@ -2529,14 +2537,6 @@ get_resource(request_rec *r, apr_pool_cleanup_register(r->pool, cleanup_baton, cleanup_fs_access, apr_pool_cleanup_null); - /* We must degrade the logging context when the request is freed. */ - cleanup_req_logging_baton = - apr_pcalloc(r->pool, sizeof(*cleanup_req_logging_baton)); - cleanup_req_logging_baton->fs = repos->fs; - cleanup_req_logging_baton->connection = r->connection; - apr_pool_pre_cleanup_register(r->pool, cleanup_req_logging_baton, - cleanup_req_logging); - /* Create an access context based on the authenticated username. */ serr = svn_fs_create_access(&access_ctx, r->user, r->pool); if (serr)