Mercurial > hg > nginx
diff src/http/ngx_http_core_module.h @ 3217:a22bf524a456
refactor http listen code:
*) add listen's to the global cmcf->ports array instead of server's one
*) rename ngx_http_listen_conf_t to ngx_http_listen_opt_t
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 21 Oct 2009 08:19:46 +0000 |
parents | 975f0558aab3 |
children | 022a7662b4ed |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.h Tue Oct 20 11:48:28 2009 +0000 +++ b/src/http/ngx_http_core_module.h Wed Oct 21 08:19:46 2009 +0000 @@ -65,17 +65,14 @@ #endif u_char addr[NGX_SOCKADDR_STRLEN + 1]; -} ngx_http_listen_conf_t; +} ngx_http_listen_opt_t; typedef struct { u_char sockaddr[NGX_SOCKADDRLEN]; socklen_t socklen; - u_char *file_name; - ngx_uint_t line; - - ngx_http_listen_conf_t conf; + ngx_http_listen_opt_t opt; } ngx_http_listen_t; @@ -142,6 +139,8 @@ ngx_hash_keys_arrays_t *variables_keys; + ngx_array_t *ports; + ngx_uint_t try_files; /* unsigned try_files:1 */ ngx_http_phase_t phases[NGX_HTTP_LOG_PHASE + 1]; @@ -149,9 +148,6 @@ typedef struct { - /* array of the ngx_http_listen_t, "listen" directive */ - ngx_array_t listen; - /* array of the ngx_http_server_name_t, "server_name" directive */ ngx_array_t server_names; @@ -172,6 +168,8 @@ ngx_flag_t merge_slashes; ngx_flag_t underscores_in_headers; + ngx_uint_t listen; /* unsigned listen:1; */ + ngx_http_core_loc_conf_t **named_locations; } ngx_http_core_srv_conf_t; @@ -222,7 +220,7 @@ typedef struct { - struct sockaddr *sockaddr; + u_char sockaddr[NGX_SOCKADDRLEN]; socklen_t socklen; ngx_hash_t hash; @@ -246,7 +244,7 @@ unsigned ssl:1; #endif - ngx_http_listen_conf_t *listen_conf; + ngx_http_listen_opt_t opt; } ngx_http_conf_addr_t;