]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy: typedef struct proxy_tunnel_conn proxy_tunnel_conn_t.
authorYann Ylavic <ylavic@apache.org>
Fri, 24 Sep 2021 10:09:23 +0000 (10:09 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 24 Sep 2021 10:09:23 +0000 (10:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893593 13f79535-47bb-0310-9956-ffa450edef68

include/ap_mmn.h
modules/proxy/mod_proxy.h
modules/proxy/proxy_util.c

index 5b21e78d109d2a9281128841c270a8d24a8add64..0d88c3f5e5eac657359e100f4ef75a64fc68c40d 100644 (file)
  *                         is being shut down.
  * 20210531.4 (2.5.1-dev)  Add ap_create_connection
  * 20210531.5 (2.5.1-dev)  Add ap_pre_connection
+ * 20210531.6 (2.5.1-dev)  Add proxy_tunnel_conn_t
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20210531
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 5             /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 6             /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
index 0b02d6f0c8b586ec54e023d068003f1e0ff322a1..e9ff6e91b25ab877e8a8e3413a6630b8c1029351 100644 (file)
@@ -1335,14 +1335,15 @@ PROXY_DECLARE(int) ap_proxy_pass_brigade(apr_bucket_alloc_t *bucket_alloc,
                                          int flush);
 
 struct proxy_tunnel_conn; /* opaque */
+typedef struct proxy_tunnel_conn proxy_tunnel_conn_t;
 typedef struct {
     request_rec *r;
     const char *scheme;
     apr_pollset_t *pollset;
     apr_array_header_t *pfds;
     apr_interval_time_t timeout;
-    struct proxy_tunnel_conn *client,
-                             *origin;
+    proxy_tunnel_conn_t *client,
+                        *origin;
     apr_size_t read_buf_size;
     int replied;
 } proxy_tunnel_rec;
index 7584f22765c6bc0ff69c6a55aaef3db955847327..0e9837a1a9c4994576830367af6bf68e88b904c6 100644 (file)
@@ -4665,8 +4665,8 @@ PROXY_DECLARE(apr_status_t) ap_proxy_tunnel_create(proxy_tunnel_rec **ptunnel,
 
     tunnel->r = r;
     tunnel->scheme = apr_pstrdup(r->pool, scheme);
-    tunnel->client = apr_pcalloc(r->pool, sizeof(struct proxy_tunnel_conn));
-    tunnel->origin = apr_pcalloc(r->pool, sizeof(struct proxy_tunnel_conn));
+    tunnel->client = apr_pcalloc(r->pool, sizeof(proxy_tunnel_conn_t));
+    tunnel->origin = apr_pcalloc(r->pool, sizeof(proxy_tunnel_conn_t));
     tunnel->pfds = apr_array_make(r->pool, 2, sizeof(apr_pollfd_t));
     tunnel->read_buf_size = ap_get_read_buf_size(r);
     tunnel->client->other = tunnel->origin;
@@ -4774,9 +4774,9 @@ static void del_pollset(apr_pollset_t *pollset, apr_pollfd_t *pfd,
 }
 
 static int proxy_tunnel_forward(proxy_tunnel_rec *tunnel,
-                                 struct proxy_tunnel_conn *in)
+                                 proxy_tunnel_conn_t *in)
 {
-    struct proxy_tunnel_conn *out = in->other;
+    proxy_tunnel_conn_t *out = in->other;
     apr_status_t rv;
     apr_off_t sent = 0;
 
@@ -4833,8 +4833,8 @@ PROXY_DECLARE(int) ap_proxy_tunnel_run(proxy_tunnel_rec *tunnel)
     int rc = OK;
     request_rec *r = tunnel->r;
     apr_pollset_t *pollset = tunnel->pollset;
-    struct proxy_tunnel_conn *client = tunnel->client,
-                             *origin = tunnel->origin;
+    proxy_tunnel_conn_t *client = tunnel->client,
+                        *origin = tunnel->origin;
     apr_interval_time_t timeout = tunnel->timeout >= 0 ? tunnel->timeout : -1;
     const char *scheme = tunnel->scheme;
     apr_status_t rv;
@@ -4880,7 +4880,7 @@ PROXY_DECLARE(int) ap_proxy_tunnel_run(proxy_tunnel_rec *tunnel)
 
         for (i = 0; i < nresults; i++) {
             const apr_pollfd_t *pfd = &results[i];
-            struct proxy_tunnel_conn *tc = pfd->client_data;
+            proxy_tunnel_conn_t *tc = pfd->client_data;
 
             ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r,
                           "proxy: %s: #%i: %s: %hx/%hx", scheme, i,
@@ -4914,7 +4914,7 @@ PROXY_DECLARE(int) ap_proxy_tunnel_run(proxy_tunnel_rec *tunnel)
                     && ((pfd->rtnevents & APR_POLLOUT)
                         || !(tc->pfd->reqevents & APR_POLLIN)
                         || !(pfd->rtnevents & (APR_POLLIN | APR_POLLHUP)))) {
-                struct proxy_tunnel_conn *out = tc, *in = tc->other;
+                proxy_tunnel_conn_t *out = tc, *in = tc->other;
 
                 ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r,
                               "proxy: %s: %s output ready",