Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 103:6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 11 Jun 2003 15:28:34 +0000 |
parents | 7ebc8b7fb816 |
children | 00bee6e7b485 |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1,10 +1,6 @@ #include <ngx_config.h> #include <ngx_core.h> - -/* ???? */ -#include <ngx_listen.h> - #include <ngx_http.h> #include <nginx.h> @@ -46,17 +42,17 @@ static ngx_command_t ngx_http_core_comm NULL}, {ngx_string("connection_pool_size"), - NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, ngx_conf_set_size_slot, - NGX_HTTP_MAIN_CONF_OFFSET, - offsetof(ngx_http_core_main_conf_t, connection_pool_size), + NGX_HTTP_SRV_CONF_OFFSET, + offsetof(ngx_http_core_srv_conf_t, connection_pool_size), NULL}, {ngx_string("post_accept_timeout"), - NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, ngx_conf_set_msec_slot, - NGX_HTTP_MAIN_CONF_OFFSET, - offsetof(ngx_http_core_main_conf_t, post_accept_timeout), + NGX_HTTP_SRV_CONF_OFFSET, + offsetof(ngx_http_core_srv_conf_t, post_accept_timeout), NULL}, {ngx_string("request_pool_size"), @@ -738,9 +734,6 @@ static void *ngx_http_core_create_main_c ngx_palloc(pool, sizeof(ngx_http_core_main_conf_t)), NGX_CONF_ERROR); - cmcf->connection_pool_size = NGX_CONF_UNSET; - cmcf->post_accept_timeout = NGX_CONF_UNSET; - ngx_init_array(cmcf->servers, pool, 5, sizeof(ngx_http_core_srv_conf_t *), NGX_CONF_ERROR); @@ -752,8 +745,7 @@ static char *ngx_http_core_init_main_con { ngx_http_core_main_conf_t *cmcf = conf; - ngx_conf_init_size_value(cmcf->connection_pool_size, 16384); - ngx_conf_init_msec_value(cmcf->post_accept_timeout, 30000); + /* TODO: remove it if no directives */ return NGX_CONF_OK; } @@ -773,6 +765,8 @@ static void *ngx_http_core_create_srv_co ngx_init_array(cscf->server_names, pool, 5, sizeof(ngx_http_server_name_t), NGX_CONF_ERROR); + cscf->connection_pool_size = NGX_CONF_UNSET; + cscf->post_accept_timeout = NGX_CONF_UNSET; cscf->request_pool_size = NGX_CONF_UNSET; cscf->client_header_timeout = NGX_CONF_UNSET; cscf->client_header_buffer_size = NGX_CONF_UNSET; @@ -827,6 +821,10 @@ static char *ngx_http_core_merge_srv_con n->core_srv_conf = conf; } + ngx_conf_merge_size_value(conf->connection_pool_size, + prev->connection_pool_size, 16384); + ngx_conf_merge_msec_value(conf->post_accept_timeout, + prev->post_accept_timeout, 30000); ngx_conf_merge_size_value(conf->request_pool_size, prev->request_pool_size, 16384); ngx_conf_merge_msec_value(conf->client_header_timeout, @@ -945,7 +943,7 @@ static char *ngx_set_listen(ngx_conf_t * ngx_str_t *args; ngx_http_listen_t *ls; - /* TODO: check duplicate 'listen' directives, + /* TODO: check duplicate 'listen' directives, add resolved name to server names ??? */ ngx_test_null(ls, ngx_push_array(&scf->listen), NGX_CONF_ERROR);