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 2010/05/13 06:35:37 UTC

svn commit: r943796 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c

Author: gstein
Date: Thu May 13 04:35:37 2010
New Revision: 943796

URL: http://svn.apache.org/viewvc?rev=943796&view=rev
Log:
Connections within serf 0.4.0 have a sticky error status. When that
happens, the connection needs to be reset.

* subversion/libsvn_ra_serf/commit.c:
  (delete_entry, abort_edit): reset the connection to get rid of its error
    status and try again.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/commit.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=943796&r1=943795&r2=943796&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Thu May 13 04:35:37 2010
@@ -1328,6 +1328,12 @@ delete_entry(const char *path,
     {
       svn_error_clear(err);
 
+#if SERF_VERSION_AT_LEAST(0, 4, 0)
+      /* An error has been registered on the connection. Reset the thing
+         so that we can use it again.  */
+      serf_connection_reset(handler->conn->conn);
+#endif
+
       handler->body_delegate = create_delete_body;
       handler->body_delegate_baton = delete_ctx;
       handler->body_type = "text/xml";
@@ -2027,6 +2033,12 @@ abort_edit(void *edit_baton,
   if (! (ctx->activity_url || ctx->txn_url))
     return SVN_NO_ERROR;
 
+#if SERF_VERSION_AT_LEAST(0, 4, 0)
+  /* An error occurred on conns[0]. serf 0.4.0 remembers that the connection
+     had a problem. We need to reset it, in order to use it again.  */
+  serf_connection_reset(ctx->session->conns[0]->conn);
+#endif
+
   /* DELETE our aborted activity */
   handler = apr_pcalloc(pool, sizeof(*handler));
   handler->method = "DELETE";