|
| 1 | +From cfdf4ffa18e812cbbff3872c1026c3c072d22c09 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Kurt Roeckx < [email protected]> |
| 3 | +Date: Fri, 2 Sep 2016 23:04:36 +0200 |
| 4 | +Subject: [PATCH] Make it build using OpenSSL 1.1.0 |
| 5 | +Origin: other, https://github.com/gnosek/nginx-upstream-fair/pull/22 |
| 6 | + |
| 7 | +The reference counter is now internal in OpenSSL and not accessible any more. |
| 8 | +--- |
| 9 | + ngx_http_upstream_fair_module.c | 14 ++++++-------- |
| 10 | + 1 file changed, 6 insertions(+), 8 deletions(-) |
| 11 | + |
| 12 | +diff --git a/ngx_http_upstream_fair_module.c b/ngx_http_upstream_fair_module.c |
| 13 | +index a4419ca..6353f1b 100644 |
| 14 | +--- a/ngx_http_upstream_fair_module.c |
| 15 | ++++ b/ngx_http_upstream_fair_module.c |
| 16 | +@@ -1174,9 +1174,8 @@ ngx_http_upstream_fair_set_session(ngx_peer_connection_t *pc, void *data) |
| 17 | + |
| 18 | + rc = ngx_ssl_set_session(pc->connection, ssl_session); |
| 19 | + |
| 20 | +- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0, |
| 21 | +- "set session: %p:%d", |
| 22 | +- ssl_session, ssl_session ? ssl_session->references : 0); |
| 23 | ++ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, |
| 24 | ++ "set session: %p", ssl_session); |
| 25 | + |
| 26 | + /* ngx_unlock_mutex(fp->peers->mutex); */ |
| 27 | + |
| 28 | +@@ -1200,8 +1199,8 @@ ngx_http_upstream_fair_save_session(ngx_peer_connection_t *pc, void *data) |
| 29 | + return; |
| 30 | + } |
| 31 | + |
| 32 | +- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0, |
| 33 | +- "save session: %p:%d", ssl_session, ssl_session->references); |
| 34 | ++ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, |
| 35 | ++ "save session: %p", ssl_session); |
| 36 | + |
| 37 | + peer = &fp->peers->peer[fp->current]; |
| 38 | + |
| 39 | +@@ -1215,9 +1214,8 @@ ngx_http_upstream_fair_save_session(ngx_peer_connection_t *pc, void *data) |
| 40 | + |
| 41 | + if (old_ssl_session) { |
| 42 | + |
| 43 | +- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0, |
| 44 | +- "old session: %p:%d", |
| 45 | +- old_ssl_session, old_ssl_session->references); |
| 46 | ++ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, |
| 47 | ++ "old session: %p", old_ssl_session); |
| 48 | + |
| 49 | + /* TODO: may block */ |
| 50 | + |
0 commit comments