httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r645584 - /httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
Date Mon, 07 Apr 2008 16:03:50 GMT
Author: jorton
Date: Mon Apr  7 09:03:49 2008
New Revision: 645584

URL: http://svn.apache.org/viewvc?rev=645584&view=rev
Log:
Clean up some more error handling in mod_ssl:

* modules/ssl/ssl_engine_io.c (ssl_filter_io_shutdown): Remove
  redundant return value (which was always success).
  (ssl_io_filter_handshake): Return APR_ECONNABORTED on handshake
  failure, rather than success.
  (ssl_io_filter_output): Ignore ssl_filter_io_shutdown return
  value.

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_engine_io.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_io.c?rev=645584&r1=645583&r2=645584&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_io.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_io.c Mon Apr  7 09:03:49 2008
@@ -905,9 +905,8 @@
  *  (called immediately _before_ the socket is closed)
  *  or called with
  */
-static apr_status_t ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx,
-                                           conn_rec *c,
-                                           int abortive)
+static void ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx,
+                                   conn_rec *c, int abortive)
 {
     SSL *ssl = filter_ctx->pssl;
     const char *type = "";
@@ -915,7 +914,7 @@
     int shutdown_type;
 
     if (!ssl) {
-        return APR_SUCCESS;
+        return;
     }
 
     /*
@@ -1007,8 +1006,6 @@
         /* prevent any further I/O */
         c->aborted = 1;
     }
-
-    return APR_SUCCESS;
 }
 
 static apr_status_t ssl_io_filter_cleanup(void *data)
@@ -1119,7 +1116,8 @@
             inctx->rc = APR_EGENERAL;
         }
 
-        return ssl_filter_io_shutdown(filter_ctx, c, 1);
+        ssl_filter_io_shutdown(filter_ctx, c, 1);
+        return inctx->rc;
     }
 
     /*
@@ -1158,7 +1156,8 @@
                          error ? error : "unknown");
             ssl_log_ssl_error(APLOG_MARK, APLOG_INFO, c->base_server);
 
-            return ssl_filter_io_shutdown(filter_ctx, c, 1);
+            ssl_filter_io_shutdown(filter_ctx, c, 1);
+            return APR_ECONNABORTED;
         }
     }
 
@@ -1183,7 +1182,8 @@
         ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c,
                       "No acceptable peer certificate available");
 
-        return ssl_filter_io_shutdown(filter_ctx, c, 1);
+        ssl_filter_io_shutdown(filter_ctx, c, 1);
+        return APR_ECONNABORTED;
     }
 
     return APR_SUCCESS;
@@ -1342,11 +1342,7 @@
              * - issue the SSL_shutdown
              */
             filter_ctx->nobuffer = 1;
-            status = ssl_filter_io_shutdown(filter_ctx, f->c, 0);
-            if (status != APR_SUCCESS) {
-                ap_log_cerror(APLOG_MARK, APLOG_INFO, status, f->c,
-                              "SSL filter error shutting down I/O");
-            }
+            ssl_filter_io_shutdown(filter_ctx, f->c, 0);
             if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
                 return status;
             }



Mime
View raw message