[PATCH] Fix for "ssl_session_cache builtin" (broken since 1.1.1, r3993)

Maxim Dounin mdounin at mdounin.ru
Mon Sep 26 03:09:28 UTC 2011


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1317004138 -14400
# Node ID c0184aca18db60b01ac87091b2ed325b24d90ada
# Parent  5cd0ddea2e49c05d598343e02a95f8dc1a451775
Fix for "ssl_session_cache builtin" (broken since 1.1.1, r3993).

diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c
--- a/src/http/modules/ngx_http_ssl_module.c
+++ b/src/http/modules/ngx_http_ssl_module.c
@@ -616,6 +616,8 @@ ngx_http_ssl_session_cache(ngx_conf_t *c
                 return NGX_CONF_ERROR;
             }
 
+            sscf->shm_zone->init = ngx_ssl_session_cache_init;
+
             continue;
         }
 
@@ -626,8 +628,6 @@ ngx_http_ssl_session_cache(ngx_conf_t *c
         sscf->builtin_session_cache = NGX_SSL_NO_BUILTIN_SCACHE;
     }
 
-    sscf->shm_zone->init = ngx_ssl_session_cache_init;
-
     return NGX_CONF_OK;
 
 invalid:
diff --git a/src/mail/ngx_mail_ssl_module.c b/src/mail/ngx_mail_ssl_module.c
--- a/src/mail/ngx_mail_ssl_module.c
+++ b/src/mail/ngx_mail_ssl_module.c
@@ -464,6 +464,8 @@ ngx_mail_ssl_session_cache(ngx_conf_t *c
                 return NGX_CONF_ERROR;
             }
 
+            scf->shm_zone->init = ngx_ssl_session_cache_init;
+
             continue;
         }
 
@@ -474,8 +476,6 @@ ngx_mail_ssl_session_cache(ngx_conf_t *c
         scf->builtin_session_cache = NGX_SSL_NO_BUILTIN_SCACHE;
     }
 
-    scf->shm_zone->init = ngx_ssl_session_cache_init;
-
     return NGX_CONF_OK;
 
 invalid:



More information about the nginx-devel mailing list