Mercurial > hg > nginx
diff src/http/ngx_http_request.c @ 1704:e584e946e198
move condition declarations inside blocks where they are used
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Dec 2007 12:09:51 +0000 |
parents | c997912a8f0b |
children | 3748e50f9b23 |
line wrap: on
line diff
--- a/src/http/ngx_http_request.c Sun Dec 09 20:52:14 2007 +0000 +++ b/src/http/ngx_http_request.c Mon Dec 10 12:09:51 2007 +0000 @@ -232,9 +232,6 @@ ngx_http_core_srv_conf_t *cscf; ngx_http_core_loc_conf_t *clcf; ngx_http_core_main_conf_t *cmcf; -#if (NGX_HTTP_SSL) - ngx_http_ssl_srv_conf_t *sscf; -#endif #if (NGX_STAT_STUB) ngx_atomic_fetch_add(ngx_stat_reading, -1); @@ -354,6 +351,9 @@ #if (NGX_HTTP_SSL) + { + ngx_http_ssl_srv_conf_t *sscf; + sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); if (sscf->enable) { @@ -370,6 +370,7 @@ r->main_filter_need_in_memory = 1; } + } #endif @@ -1398,11 +1399,7 @@ static void ngx_http_process_request(ngx_http_request_t *r) { - ngx_connection_t *c; -#if (NGX_HTTP_SSL) - long rc; - ngx_http_ssl_srv_conf_t *sscf; -#endif + ngx_connection_t *c; c = r->connection; @@ -1416,6 +1413,9 @@ #if (NGX_HTTP_SSL) if (c->ssl) { + long rc; + ngx_http_ssl_srv_conf_t *sscf; + sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); if (sscf->verify) { @@ -1469,12 +1469,6 @@ { ngx_http_core_loc_conf_t *clcf; ngx_http_core_srv_conf_t *cscf; -#if (NGX_PCRE) - ngx_int_t n; - ngx_uint_t i; - ngx_str_t name; - ngx_http_server_name_t *sn; -#endif cscf = ngx_hash_find_combined(&r->virtual_names->names, hash, host, len); @@ -1485,6 +1479,10 @@ #if (NGX_PCRE) if (r->virtual_names->nregex) { + ngx_int_t n; + ngx_uint_t i; + ngx_str_t name; + ngx_http_server_name_t *sn; name.len = len; name.data = host;