]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*core: clarify comments and use hook API better to check for presence of callbacks.
authorStefan Eissing <icing@apache.org>
Thu, 9 Sep 2021 07:06:00 +0000 (07:06 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 9 Sep 2021 07:06:00 +0000 (07:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893164 13f79535-47bb-0310-9956-ffa450edef68

include/http_ssl.h
server/ssl.c

index 46f32a8134963bd2a107fa0ccefcf8141882397c..e9fb0efd56a2e9644aeed76f26f3ff123b1ec42e 100644 (file)
@@ -56,13 +56,14 @@ AP_DECLARE(int) ap_ssl_conn_is_ssl(conn_rec *c);
  * This hook can be called several times in the lifetime of an outgoing connection, e.g.
  * when it is re-used in different request contexts. It will at least be called after the
  * connection was created and before the pre-connection hooks is invoked.
- * All outgoing-connection hooks are run until one returns something other than ok or decline.
- * if enable_ssl != 0, a hook that sets up SSL for the connection needs to return DONE.
+ * All outgoing-connection hooks are run until one returns something other than DECLINE.
+ * if enable_ssl != 0, a hook that sets up SSL for the connection needs to return OK
+ * to prevent subsequent hooks from doing the same.
  *
  * @param c The connection on which requests/data are to be sent.
  * @param dir_conf The directory configuration in which this connection is being used.
  * @param enable_ssl If != 0, the SSL protocol should be enabled for this connection.
- * @return OK or DECLINED, DONE when ssl was enabled
+ * @return DECLINED, OK when ssl was enabled
  */
 AP_DECLARE_HOOK(int, ssl_bind_outgoing,
                (conn_rec *c, struct ap_conf_vector_t *dir_conf, int enable_ssl))
index f07efd36186ee82d0e317ad80613f2e7c497d987..e9432793d9c25698f6e963f277b15098e64ed48e 100644 (file)
@@ -157,7 +157,7 @@ AP_DECLARE(int) ap_ssl_bind_outgoing(conn_rec *c, struct ap_conf_vector_t *dir_c
 
 AP_DECLARE(int) ap_ssl_has_outgoing_handlers(void)
 {
-    return (_hooks.link_ssl_bind_outgoing && _hooks.link_ssl_bind_outgoing->nelts > 0)
+    return (ap_hook_get_ssl_bind_outgoing() && ap_hook_get_ssl_bind_outgoing()->nelts > 0)
         || module_ssl_engine_set || module_ssl_proxy_enable;
 }