subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1335350 - in /subversion/trunk/subversion/libsvn_ra_serf: ra_serf.h util.c
Date Tue, 08 May 2012 06:27:27 GMT
Author: gstein
Date: Tue May  8 06:27:27 2012
New Revision: 1335350

URL: http://svn.apache.org/viewvc?rev=1335350&view=rev
Log:
Make svn_ra_serf__handle_server_error private.

* subversion/libsvn_ra_serf/ra_serf.h:
  (svn_ra_serf__handle_server_error): removed

* subversion/libsvn_ra_serf/util.c:
  (svn_ra_serf__handle_server_error); renamed to ...
  (handle_server_error): ... this. rename param to SCRATCH_POOL.
  (svn_ra_serf__handle_xml_parser): track rename
  (handle_response): track rename

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
    subversion/trunk/subversion/libsvn_ra_serf/util.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h?rev=1335350&r1=1335349&r2=1335350&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h Tue May  8 06:27:27 2012
@@ -680,16 +680,6 @@ svn_ra_serf__handle_discard_body(serf_re
                                  void *baton,
                                  apr_pool_t *pool);
 
-/*
- * Handler that retrieves the embedded XML error response from the
- * the @a response body associated with a @a request.
- *
- * All temporary allocations will be made in a @a pool.
- */
-svn_error_t *
-svn_ra_serf__handle_server_error(serf_request_t *request,
-                                 serf_bucket_t *response,
-                                 apr_pool_t *pool);
 
 /*
  * Handler that retrieves the embedded XML multistatus response from the

Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1335350&r1=1335349&r2=1335350&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Tue May  8 06:27:27 2012
@@ -1418,6 +1418,21 @@ svn_ra_serf__process_pending(svn_ra_serf
 }
 
 
+/* ### this is still broken conceptually. just shifting incrementally... */
+static svn_error_t *
+handle_server_error(serf_request_t *request,
+                    serf_bucket_t *response,
+                    apr_pool_t *scratch_pool)
+{
+  svn_ra_serf__server_error_t server_err = { 0 };
+
+  svn_error_clear(svn_ra_serf__handle_discard_body(request, response,
+                                                   &server_err, scratch_pool));
+
+  return server_err.error;
+}
+
+
 /* Implements svn_ra_serf__response_handler_t */
 svn_error_t *
 svn_ra_serf__handle_xml_parser(serf_request_t *request,
@@ -1442,7 +1457,7 @@ svn_ra_serf__handle_xml_parser(serf_requ
     {
       add_done_item(ctx);
 
-      err = svn_ra_serf__handle_server_error(request, response, pool);
+      err = handle_server_error(request, response, pool);
 
       SVN_ERR(svn_error_compose_create(
         svn_ra_serf__handle_discard_body(request, response, NULL, pool),
@@ -1583,20 +1598,6 @@ svn_ra_serf__handle_xml_parser(serf_requ
 }
 
 
-svn_error_t *
-svn_ra_serf__handle_server_error(serf_request_t *request,
-                                 serf_bucket_t *response,
-                                 apr_pool_t *pool)
-{
-  svn_ra_serf__server_error_t server_err = { 0 };
-
-  svn_error_clear(svn_ra_serf__handle_discard_body(request, response,
-                                                   &server_err, pool));
-
-  return server_err.error;
-}
-
-
 apr_status_t
 svn_ra_serf__credentials_callback(char **username, char **password,
                                   serf_request_t *request, void *baton,
@@ -1811,8 +1812,7 @@ handle_response(serf_request_t *request,
       /* ### this is completely wrong. it only catches the current network
          ### packet. we need ongoing parsing. see SERVER_ERROR down below
          ### in the process_body: area. we'll eventually move to that.  */
-      SVN_ERR(svn_ra_serf__handle_server_error(request, response,
-                                               scratch_pool));
+      SVN_ERR(handle_server_error(request, response, scratch_pool));
 
       if (!handler->session->pending_error)
         {



Mime
View raw message