httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathihalli, Madhusudan" <mad...@hp.com>
Subject RE: [PATCH ?] RE: SEGV in allocator_free
Date Wed, 24 Mar 2004 22:04:05 GMT
>-----Original Message-----
>From: Joe Orton [mailto:jorton@redhat.com]
[SNIP]
>I think the correct fix is to stop trying to send the shutdown from the
>cleanup, which didn't actually work anyway.  Can you test something
>like:

It works (atleast I don't see any SEGV's). The question still remains, but it shouldn't prevent
from committing the change !

Thanks
-Madhu


>
>Index: ssl_engine_io.c
>===================================================================
>RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_io.c,v
>retrieving revision 1.121
>diff -u -r1.121 ssl_engine_io.c
>--- ssl_engine_io.c	29 Feb 2004 00:29:20 -0000	1.121
>+++ ssl_engine_io.c	24 Mar 2004 15:44:37 -0000
>@@ -984,22 +984,19 @@
> 
> static apr_status_t ssl_io_filter_cleanup(void *data)
> {
>-    apr_status_t ret;
>-    ssl_filter_ctx_t *filter_ctx = (ssl_filter_ctx_t *)data;
>-    conn_rec *c;
>+    ssl_filter_ctx_t *filter_ctx = data;
> 
>-    if (!filter_ctx->pssl) {
>-        /* already been shutdown */
>-        return APR_SUCCESS;
>-    }
>+    if (filter_ctx->pssl) {
>+        conn_rec *c = (conn_rec *)SSL_get_app_data(filter_ctx->pssl);
>+        SSLConnRec *sslconn = myConnConfig(c);
> 
>-    c = (conn_rec *)SSL_get_app_data(filter_ctx->pssl);
>-    if ((ret = ssl_filter_io_shutdown(filter_ctx, c, 0)) != 
>APR_SUCCESS) {
>-        ap_log_error(APLOG_MARK, APLOG_INFO, ret, NULL,
>-                     "SSL filter error shutting down I/O");
>+        SSL_free(filter_ctx->pssl);
>+        filter_ctx->pssl = NULL;
>+        
>+        if (sslconn) sslconn->ssl = NULL;
>     }
> 
>-    return ret;
>+    return APR_SUCCESS;
> }
> 
> /*
>

Mime
View raw message