serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1711210 - /serf/trunk/outgoing.c
Date Thu, 29 Oct 2015 10:11:27 GMT
Author: rhuijben
Date: Thu Oct 29 10:11:27 2015
New Revision: 1711210

URL: http://svn.apache.org/viewvc?rev=1711210&view=rev
Log:
On my quest to make the MAC buildbot green I tried running the tests in
parallel. This fixes the first segfault I found.

* outgoing.c
  (prepare_conn_streams): Don't handle SERF_CONN_CLOSING as tunnel setup,
    as this makes us write items to a NULL bucket.

Modified:
    serf/trunk/outgoing.c

Modified: serf/trunk/outgoing.c
URL: http://svn.apache.org/viewvc/serf/trunk/outgoing.c?rev=1711210&r1=1711209&r2=1711210&view=diff
==============================================================================
--- serf/trunk/outgoing.c (original)
+++ serf/trunk/outgoing.c Thu Oct 29 10:11:27 2015
@@ -331,8 +331,7 @@ static apr_status_t prepare_conn_streams
         }
         *ostreamt = conn->ostream_tail;
         *ostreamh = conn->ostream_head;
-    } else {
-        /* state == SERF_CONN_SETUP_SSLTUNNEL  */
+    } else if (conn->state == SERF_CONN_SETUP_SSLTUNNEL) {
 
         /* SSL tunnel needed and not set up yet, get a direct unencrypted
          stream for this socket */
@@ -346,6 +345,11 @@ static apr_status_t prepare_conn_streams
          bucket yet. This ensure the CONNECT request is sent unencrypted
          to the proxy. */
         *ostreamt = *ostreamh = conn->ssltunnel_ostream;
+    } else {
+        /* SERF_CONN_CLOSING or SERF_CONN_INIT */
+
+        *ostreamt = conn->ostream_tail;
+        *ostreamh = conn->ostream_head;
     }
 
     return APR_SUCCESS;



Mime
View raw message