You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2011/07/20 22:47:28 UTC

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

Author: gstein
Date: Wed Jul 20 20:47:27 2011
New Revision: 1148936

URL: http://svn.apache.org/viewvc?rev=1148936&view=rev
Log:
Fix a buglet in the pushback code: we don't want to attempt to process
pending content if we're already done.

Enable the pushback/pause code.

* subversion/libsvn_ra_serf/util.c:
  (svn_ra_serf__process_pending): fast-path exit if we're already done
  (svn_ra_serf__handle_xml_parser): enable the pushback code

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=1148936&r1=1148935&r2=1148936&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Wed Jul 20 20:47:27 2011
@@ -1520,8 +1520,8 @@ svn_ra_serf__process_pending(svn_ra_serf
     }
 #endif
 
-  /* Fast path exit: already paused, or nothing to do.  */
-  if (parser->paused || parser->pending == NULL)
+  /* Fast path exit: already paused, nothing to do, or already done.  */
+  if (parser->paused || parser->pending == NULL || *parser->done)
     return SVN_NO_ERROR;
 
   /* ### it is possible that the XML parsing of the pending content is
@@ -1760,7 +1760,6 @@ svn_ra_serf__handle_xml_parser(serf_requ
          We want to save arriving content into the PENDING structures if
          the parser has been paused, or we already have data in there (so
          the arriving data is appended, rather than injected out of order)  */
-#ifdef PBTEST_ACTIVE
       if (ctx->paused || HAS_PENDING_DATA(ctx->pending))
         {
           err = write_to_pending(ctx, data, len, pool);
@@ -1773,7 +1772,6 @@ svn_ra_serf__handle_xml_parser(serf_requ
           PBTEST_MAYBE_STEP(ctx, FALSE);
         }
       else
-#endif
         {
           err = inject_to_parser(ctx, data, len, &sl);
           if (err)