Author: rhuijben
Date: Sun Aug  7 16:03:18 2011
New Revision: 1154717

URL: http://svn.apache.org/viewvc?rev=1154717&view=rev
Log:
In ra_serf: When processing an update as a delta stream call svn_stream_close()
on the stream to allow detecting an unexpected end of the svndiff data (and
to allow cleaning up the pools inside).

* subversion/libsvn_ra_serf/update.c
  (handle_fetch): Close the delta stream if there is one instead of only
    doing a partial cleanup ourself. Add two svn_error_trace() wraps.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/update.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1154717&r1=1154716&r2=1154717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Sun Aug  7 16:03:18 2011
@@ -983,7 +983,12 @@ handle_fetch(serf_request_t *request,
              ### end of this block, so it will work for now.  */
           apr_pool_t *scratch_pool = info->editor_pool;
 
-          err = info->textdelta(NULL, info->textdelta_baton);
+          if (fetch_ctx->delta_stream)
+            err = svn_error_trace(svn_stream_close(fetch_ctx->delta_stream));
+          else
+            err = svn_error_trace(info->textdelta(NULL,
+                                                  info->textdelta_baton));
+
           if (err)
             {
               return error_fetch(request, fetch_ctx, err);


Reply via email to