Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/subversion/libsvn_ra_serf/update.c  view on Meta::CPAN

          report->num_active_propfinds--;

          if (report->active_dir_propfinds)
            {
              svn_ra_serf__list_t *cur, *prev;

              prev = NULL;
              cur = report->active_dir_propfinds;

              while (cur)
                {
                  report_dir_t *item = cur->data;

                  if (item->propfind_handler == done_list->data)
                    {
                      break;
                    }

                  prev = cur;
                  cur = cur->next;
                }
              SVN_ERR_ASSERT(cur); /* we expect to find a matching propfind! */

              /* If we found a match, set the new props and remove this
               * propchange from our list.
               */
              if (cur)
                {
                  report_dir_t *cur_dir = cur->data;

                  if (!prev)
                    {
                      report->active_dir_propfinds = cur->next;
                    }
                  else
                    {
                      prev->next = cur->next;
                    }

                  /* See if this directory (and perhaps even parents of that)
                     can be closed now.

                     NOTE:  This could delete cur_dir->pool, from which is
                     allocated the list item in report->active_dir_propfinds.
                  */
                  SVN_ERR(maybe_close_dir_chain(cur_dir));
                }
            }

          done_list = next_done;
        }
      report->done_dir_propfinds = NULL;

      /* If the parser is paused, and the number of active requests has
         dropped far enough, then resume parsing.  */
      if (parser_ctx->paused
          && (report->num_active_fetches + report->num_active_propfinds
              < REQUEST_COUNT_TO_RESUME))
        parser_ctx->paused = FALSE;

      /* If we have not paused the parser and it looks like data MAY be
         present (we can't know for sure because of the private structure),
         then go process the pending content.  */
      if (!parser_ctx->paused && parser_ctx->pending != NULL)
        SVN_ERR(svn_ra_serf__process_pending(parser_ctx,
                                             &report->report_received,
                                             iterpool_inner));

      /* Debugging purposes only! */
      for (i = 0; i < sess->num_conns; i++)
        {
          serf_debug__closed_conn(sess->conns[i]->bkt_alloc);
        }
    }

  /* If we got a complete report, close the edit.  Otherwise, abort it. */
  if (report->report_completed)
    {
      /* Ensure that we opened and closed our root dir and that we closed
       * all of our children. */
      if (!report->closed_root && report->root_dir != NULL)
        {
          SVN_ERR(close_all_dirs(report->root_dir));
        }

      err = report->update_editor->close_edit(report->update_baton, iterpool);
    }
  else
    {
      /* Tell the editor that something failed */
      err = report->update_editor->abort_edit(report->update_baton, iterpool);

      err = svn_error_create(SVN_ERR_RA_DAV_MALFORMED_DATA, err,
                             _("Missing update-report close tag"));
    }

  svn_pool_destroy(iterpool);
  return svn_error_trace(err);
}


static svn_error_t *
abort_report(void *report_baton,
             apr_pool_t *pool)
{
#if 0
  report_context_t *report = report_baton;
#endif

  /* Should we perform some cleanup here? */

  return SVN_NO_ERROR;
}

static const svn_ra_reporter3_t ra_serf_reporter = {
  set_path,
  delete_path,
  link_path,
  finish_report,
  abort_report
};



( run in 0.684 second using v1.01-cache-2.11-cpan-d7f47b0818f )