41a6c3
diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c
41a6c3
index 85c6ce7..4a9fc9a 100644
41a6c3
--- a/modules/ssl/ssl_engine_io.c
41a6c3
+++ b/modules/ssl/ssl_engine_io.c
41a6c3
@@ -834,19 +834,20 @@ static apr_status_t ssl_filter_write(ap_filter_t *f,
41a6c3
  * establish an outgoing SSL connection. */
41a6c3
 #define MODSSL_ERROR_BAD_GATEWAY (APR_OS_START_USERERR + 1)
41a6c3
 
41a6c3
-static void ssl_io_filter_disable(SSLConnRec *sslconn, ap_filter_t *f)
41a6c3
+static void ssl_io_filter_disable(SSLConnRec *sslconn, 
41a6c3
+                                  bio_filter_in_ctx_t *inctx)
41a6c3
 {
41a6c3
-    bio_filter_in_ctx_t *inctx = f->ctx;
41a6c3
     SSL_free(inctx->ssl);
41a6c3
     sslconn->ssl = NULL;
41a6c3
     inctx->ssl = NULL;
41a6c3
     inctx->filter_ctx->pssl = NULL;
41a6c3
 }
41a6c3
 
41a6c3
-static apr_status_t ssl_io_filter_error(ap_filter_t *f,
41a6c3
+static apr_status_t ssl_io_filter_error(bio_filter_in_ctx_t *inctx,
41a6c3
                                         apr_bucket_brigade *bb,
41a6c3
                                         apr_status_t status)
41a6c3
 {
41a6c3
+    ap_filter_t *f = inctx->f;
41a6c3
     SSLConnRec *sslconn = myConnConfig(f->c);
41a6c3
     apr_bucket *bucket;
41a6c3
     int send_eos = 1;
41a6c3
@@ -860,7 +861,7 @@ static apr_status_t ssl_io_filter_error(ap_filter_t *f,
41a6c3
             ssl_log_ssl_error(SSLLOG_MARK, APLOG_INFO, sslconn->server);
41a6c3
 
41a6c3
             sslconn->non_ssl_request = NON_SSL_SEND_HDR_SEP;
41a6c3
-            ssl_io_filter_disable(sslconn, f);
41a6c3
+            ssl_io_filter_disable(sslconn, inctx);
41a6c3
 
41a6c3
             /* fake the request line */
41a6c3
             bucket = HTTP_ON_HTTPS_PORT_BUCKET(f->c->bucket_alloc);
41a6c3
@@ -1342,7 +1343,7 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
41a6c3
      * rather than have SSLEngine On configured.
41a6c3
      */
41a6c3
     if ((status = ssl_io_filter_handshake(inctx->filter_ctx)) != APR_SUCCESS) {
41a6c3
-        return ssl_io_filter_error(f, bb, status);
41a6c3
+        return ssl_io_filter_error(inctx, bb, status);
41a6c3
     }
41a6c3
 
41a6c3
     if (is_init) {
41a6c3
@@ -1396,7 +1397,7 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
41a6c3
 
41a6c3
     /* Handle custom errors. */
41a6c3
     if (status != APR_SUCCESS) {
41a6c3
-        return ssl_io_filter_error(f, bb, status);
41a6c3
+        return ssl_io_filter_error(inctx, bb, status);
41a6c3
     }
41a6c3
 
41a6c3
     /* Create a transient bucket out of the decrypted data. */
41a6c3
@@ -1613,7 +1614,7 @@ static apr_status_t ssl_io_filter_output(ap_filter_t *f,
41a6c3
     inctx->block = APR_BLOCK_READ;
41a6c3
 
41a6c3
     if ((status = ssl_io_filter_handshake(filter_ctx)) != APR_SUCCESS) {
41a6c3
-        return ssl_io_filter_error(f, bb, status);
41a6c3
+        return ssl_io_filter_error(inctx, bb, status);
41a6c3
     }
41a6c3
 
41a6c3
     while (!APR_BRIGADE_EMPTY(bb)) {