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 2012/05/05 23:26:18 UTC

svn commit: r1334508 - in /subversion/trunk/subversion/libsvn_ra_serf: merge.c property.c

Author: gstein
Date: Sat May  5 21:26:17 2012
New Revision: 1334508

URL: http://svn.apache.org/viewvc?rev=1334508&view=rev
Log:
More conversion to HANDLER->SLINE.

* subversion/libsvn_ra_serf/merge.c:
  (svn_ra_serf__merge_context_t): add HANDLER. remove STATUS.
  (svn_ra_serf__merge_create_req): set up HANDLER_POOL and store
    HANDLER into the merge context.
  (svn_ra_serf__merge_get_status); switch to SLINE.CODE

* subversion/libsvn_ra_serf/property.c
  (svn_ra_serf__propfind_context_t): remove STATUS_CODE
  (svn_ra_serf__deliver_props): initialize HANDLER_POOL. forget the
    status code in the parser context.
  (svn_ra_serf__wait_for_props): use HANDLER->SLINE

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/merge.c
    subversion/trunk/subversion/libsvn_ra_serf/property.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/merge.c?rev=1334508&r1=1334507&r2=1334508&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/merge.c Sat May  5 21:26:17 2012
@@ -90,6 +90,7 @@ struct svn_ra_serf__merge_context_t
   apr_pool_t *pool;
 
   svn_ra_serf__session_t *session;
+  svn_ra_serf__handler_t *handler;
 
   apr_hash_t *lock_tokens;
   svn_boolean_t keep_locks;
@@ -97,8 +98,6 @@ struct svn_ra_serf__merge_context_t
   const char *merge_resource_url; /* URL of resource to be merged. */
   const char *merge_url; /* URL at which the MERGE request is aimed. */
 
-  int status;
-
   svn_boolean_t done;
 
   svn_commit_info_t *commit_info;
@@ -535,6 +534,7 @@ svn_ra_serf__merge_create_req(svn_ra_ser
 
   handler = apr_pcalloc(pool, sizeof(*handler));
 
+  handler->handler_pool = pool;
   handler->method = "MERGE";
   handler->path = merge_ctx->merge_url;
   handler->body_delegate = create_merge_body;
@@ -550,7 +550,6 @@ svn_ra_serf__merge_create_req(svn_ra_ser
   parser_ctx->end = end_merge;
   parser_ctx->cdata = cdata_merge;
   parser_ctx->done = &merge_ctx->done;
-  parser_ctx->status_code = &merge_ctx->status;
 
   handler->header_delegate = setup_merge_headers;
   handler->header_delegate_baton = merge_ctx;
@@ -558,6 +557,8 @@ svn_ra_serf__merge_create_req(svn_ra_ser
   handler->response_handler = svn_ra_serf__handle_xml_parser;
   handler->response_baton = parser_ctx;
 
+  merge_ctx->handler = handler;
+
   svn_ra_serf__request_create(handler);
 
   *ret_ctx = merge_ctx;
@@ -580,5 +581,5 @@ svn_ra_serf__merge_get_commit_info(svn_r
 int
 svn_ra_serf__merge_get_status(svn_ra_serf__merge_context_t *ctx)
 {
-  return ctx->status;
+  return ctx->handler->sline.code;
 }

Modified: subversion/trunk/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/property.c?rev=1334508&r1=1334507&r2=1334508&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/property.c Sat May  5 21:26:17 2012
@@ -97,9 +97,6 @@ struct svn_ra_serf__propfind_context_t {
    */
   const char *current_path;
 
-  /* Returned status code. */
-  int status_code;
-
   /* Are we done issuing the PROPFIND? */
   svn_boolean_t done;
 
@@ -552,6 +549,7 @@ svn_ra_serf__deliver_props(svn_ra_serf__
 
   handler = apr_pcalloc(pool, sizeof(*handler));
 
+  handler->handler_pool = pool;
   handler->method = "PROPFIND";
   handler->path = path;
   handler->body_delegate = create_propfind_body;
@@ -571,7 +569,6 @@ svn_ra_serf__deliver_props(svn_ra_serf__
   parser_ctx->start = start_propfind;
   parser_ctx->end = end_propfind;
   parser_ctx->cdata = cdata_propfind;
-  parser_ctx->status_code = &new_prop_ctx->status_code;
   parser_ctx->done = &new_prop_ctx->done;
   parser_ctx->done_list = new_prop_ctx->done_list;
   parser_ctx->done_item = &new_prop_ctx->done_item;
@@ -609,7 +606,7 @@ svn_ra_serf__wait_for_props(svn_ra_serf_
 
   err = svn_ra_serf__context_run_wait(&prop_ctx->done, sess, pool);
 
-  err2 = svn_ra_serf__error_on_status(prop_ctx->status_code,
+  err2 = svn_ra_serf__error_on_status(prop_ctx->handler->sline.code,
                                       prop_ctx->path, NULL);
   if (err2)
     {