forked from openresty/openresty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-1.0.4-gcc46_fixes.patch
37 lines (33 loc) · 1.24 KB
/
nginx-1.0.4-gcc46_fixes.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# HG changeset patch
# User Maxim Dounin <[email protected]>
# Date 1309424678 -14400
# Node ID 60a67d95638f9187418a3a26c1fcb9f06be7a4fc
# Parent 1c167244d2fdb064c159012c50a7ae3fd1ed254a
Fix another gcc46 unused-but-set warning.
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -1687,20 +1687,24 @@ ngx_ssl_get_cached_session(ngx_ssl_conn_
ngx_int_t rc;
ngx_shm_zone_t *shm_zone;
ngx_slab_pool_t *shpool;
+#if (NGX_DEBUG)
ngx_connection_t *c;
+#endif
ngx_rbtree_node_t *node, *sentinel;
ngx_ssl_session_t *sess;
ngx_ssl_sess_id_t *sess_id;
ngx_ssl_session_cache_t *cache;
u_char buf[NGX_SSL_MAX_SESSION_SIZE];
- c = ngx_ssl_get_connection(ssl_conn);
-
hash = ngx_crc32_short(id, (size_t) len);
*copy = 0;
+#if (NGX_DEBUG)
+ c = ngx_ssl_get_connection(ssl_conn);
+
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
"ssl get session: %08XD:%d", hash, len);
+#endif
shm_zone = SSL_CTX_get_ex_data(SSL_get_SSL_CTX(ssl_conn),
ngx_ssl_session_cache_index);