aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-07-22 10:43:50 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-07-22 10:43:50 +0000
commita7ed0951e36464ff82961aff1cd6404cfa50bcd4 (patch)
treee1713befa4cec611cabcea265130f97002373689
parentf39642a90798af3c61de6e74b8da6cad96a9f159 (diff)
downloadnginx-a7ed0951e36464ff82961aff1cd6404cfa50bcd4.tar.gz
nginx-a7ed0951e36464ff82961aff1cd6404cfa50bcd4.zip
fix build by gcc46 with -Wunused-value option
patch by Maxim Dounin
-rw-r--r--src/event/ngx_event_openssl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index a83364027..297181742 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -1716,20 +1716,24 @@ ngx_ssl_get_cached_session(ngx_ssl_conn_t *ssl_conn, u_char *id, int len,
ngx_int_t rc;
ngx_shm_zone_t *shm_zone;
ngx_slab_pool_t *shpool;
- ngx_connection_t *c;
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);
+#if (NGX_DEBUG)
+ ngx_connection_t *c;
+#endif
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);