You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Joe Orton <jo...@redhat.com> on 2005/05/19 18:57:23 UTC

[PATCH] further #2297 work

I can't seem to access the issue tracker at the moment; here's a further
patch for the neon 0.25 conversion, issue #2297.

(I haven't tested this with neon 0.24.x but I think it's harmless for
that version too, so needn't be made conditional)

* subversion/libsvn_ra_dav/fetch.c (reporter_finish_report): Return the
error stored in the baton in preference to the error returned by
svn_ra_dav__parsed_request; callbacks which set rb->error and abort the
XML parse will cause that function to immediately return with a
(useless) error in neon 0.25.  Also fix an error object leak.

--- subversion/libsvn_ra_dav/fetch.c	(revision 14779)
+++ subversion/libsvn_ra_dav/fetch.c	(working copy)
@@ -2805,10 +2805,17 @@
   /* we're done with the file */
   (void) apr_file_close(rb->tmpfile);
 
+  /* rb->err contains the relevant error if the response was aborted
+   * by a callback returning NE_XML_ABORT; always return that error if
+   * present. */
+  if (rb->err != NULL)
+    {
+      if (err)
+        svn_error_clear(err);
+      return rb->err;
+    }
   if (err != NULL)
     return err;
-  if (rb->err != NULL)
-    return rb->err;
 
   /* We got the whole HTTP response thing done.  *Whew*.  Our edit
      baton should have been closed by now, so return a failure if it

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org