diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2003-07-07 06:11:50 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2003-07-07 06:11:50 +0000 |
| commit | 9d639520aa95f0ff3882ea348d4347f69cbae493 (patch) | |
| tree | a163ada230b77745dc9117df4a2a5dce756115cc /src/http | |
| parent | 340b03b201c77f394cc70fda4d960ad6c3b68905 (diff) | |
| download | nginx-9d639520aa95f0ff3882ea348d4347f69cbae493.tar.gz nginx-9d639520aa95f0ff3882ea348d4347f69cbae493.tar.bz2 | |
nginx-0.0.1-2003-07-07-10:11:50 import
Diffstat (limited to '')
| -rw-r--r-- | src/http/ngx_http.c | 13 | ||||
| -rw-r--r-- | src/http/ngx_http_core_module.c | 18 | ||||
| -rw-r--r-- | src/http/ngx_http_core_module.h | 1 | ||||
| -rw-r--r-- | src/http/ngx_http_event.c | 2 |
4 files changed, 27 insertions, 7 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index b9a85289e..cc1f8e894 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -69,7 +69,6 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) *(ngx_http_conf_ctx_t **) conf = ctx; - /* count the number of the http modules and set up their indices */ ngx_http_max_module = 0; @@ -273,9 +272,9 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) & NGX_HTTP_DEFAULT_SERVER) { ngx_log_error(NGX_LOG_ERR, cf->log, 0, - "duplicate default server in %s:%d", - lscf[l].file_name.data, - lscf[l].line); + "duplicate default server in %s:%d", + lscf[l].file_name.data, + lscf[l].line); return NGX_CONF_ERROR; } @@ -471,7 +470,7 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ls->post_accept_timeout = cscf->post_accept_timeout; #if (WIN32) - iocpcf = ngx_event_get_conf(ngx_iocp_module); + iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module); if (iocpcf->acceptex_read) { ls->post_accept_buffer_size = cscf->client_header_buffer_size; } @@ -489,7 +488,7 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_test_null(inport, ngx_palloc(cf->pool, - sizeof(ngx_http_in_port_t)), + sizeof(ngx_http_in_port_t)), NGX_CONF_ERROR); inport->port = in_port[p].port; @@ -529,7 +528,7 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) /* DEBUG STUFF */ in_port = in_ports.elts; for (p = 0; p < in_ports.nelts; p++) { -ngx_log_debug(cf->log, "port: %d" _ in_port[p].port); +ngx_log_debug(cf->log, "port: %d %08x" _ in_port[p].port _ &in_port[p]); in_addr = in_port[p].addrs.elts; for (a = 0; a < in_port[p].addrs.nelts; a++) { char ip[20]; diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 7823eca94..60a9fcfaf 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -867,6 +867,7 @@ static void *ngx_http_core_create_loc_conf(ngx_pool_t *pool) lcf->types = NULL; lcf->default_type.len = 0; lcf->default_type.data = NULL; + lcf->err_log = NULL; */ @@ -1050,3 +1051,20 @@ static char *ngx_set_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return NGX_CONF_OK; } + + +static char *ngx_set_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) +{ + ngx_http_core_loc_conf_t *lcf = conf; + + ngx_str_t *value; + + value = cf->args->elts; + + ngx_test_null(lcf->err_log, ngx_log_create_errlog(cf->cycle), + NGX_CONF_ERROR); + + lcf->err_log->file->name = value[1]; + + return NGX_CONF_OK; +} diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h index c6b2bccd5..08c1f024e 100644 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h @@ -107,6 +107,7 @@ typedef struct { ngx_msec_t lingering_time; /* lingering_time */ ngx_msec_t lingering_timeout; /* lingering_timeout */ + ngx_log_t *err_log; } ngx_http_core_loc_conf_t; diff --git a/src/http/ngx_http_event.c b/src/http/ngx_http_event.c index 06a98a372..5531bac16 100644 --- a/src/http/ngx_http_event.c +++ b/src/http/ngx_http_event.c @@ -152,6 +152,8 @@ static void ngx_http_init_request(ngx_event_t *rev) in_port = c->servers; in_addr = in_port->addrs.elts; +ngx_log_debug(rev->log, "IN: %08x" _ in_port); + r->port = in_port->port; r->port_name = &in_port->port_name; |
