Mercurial > hg > nginx
comparison src/http/ngx_http.c @ 110:152567c11325
nginx-0.0.1-2003-07-02-22:51:41 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 02 Jul 2003 18:51:41 +0000 |
parents | 7db96f59bc29 |
children | d7f606e25b99 |
comparison
equal
deleted
inserted
replaced
109:a9bc21d63fe4 | 110:152567c11325 |
---|---|
7 | 7 |
8 static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | 8 static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); |
9 | 9 |
10 | 10 |
11 int ngx_http_max_module; | 11 int ngx_http_max_module; |
12 | |
13 | |
14 ngx_array_t ngx_http_translate_handlers; | |
15 ngx_array_t ngx_http_index_handlers; | |
16 | 12 |
17 | 13 |
18 int (*ngx_http_top_header_filter) (ngx_http_request_t *r); | 14 int (*ngx_http_top_header_filter) (ngx_http_request_t *r); |
19 int (*ngx_http_top_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch); | 15 int (*ngx_http_top_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch); |
20 | 16 |
208 } | 204 } |
209 | 205 |
210 | 206 |
211 /* init list of the handlers */ | 207 /* init list of the handlers */ |
212 | 208 |
213 ngx_init_array(ngx_http_translate_handlers, | 209 ngx_init_array(cmcf->translate_handlers, cf->cycle->pool, |
214 cf->pool, 10, sizeof(ngx_http_handler_pt), NGX_CONF_ERROR); | 210 10, sizeof(ngx_http_handler_pt), NGX_CONF_ERROR); |
215 | 211 |
216 ngx_init_array(ngx_http_index_handlers, | 212 ngx_init_array(cmcf->index_handlers, cf->cycle->pool, |
217 cf->pool, 3, sizeof(ngx_http_handler_pt), NGX_CONF_ERROR); | 213 3, sizeof(ngx_http_handler_pt), NGX_CONF_ERROR); |
218 | 214 |
219 | 215 |
220 /* create the lists of the ports, the addresses and the server names | 216 /* create the lists of the ports, the addresses and the server names |
221 to allow quickly find the server core module configuration at run-time */ | 217 to allow quickly find the server core module configuration at run-time */ |
222 | 218 |
427 } | 423 } |
428 | 424 |
429 in_addr = in_port[p].addrs.elts; | 425 in_addr = in_port[p].addrs.elts; |
430 while (a < in_port[p].addrs.nelts) { | 426 while (a < in_port[p].addrs.nelts) { |
431 | 427 |
432 ngx_test_null(ls, ngx_push_array(&ngx_listening_sockets), | 428 ngx_test_null(ls, ngx_push_array(&cf->cycle->listening), |
433 NGX_CONF_ERROR); | 429 NGX_CONF_ERROR); |
434 ngx_memzero(ls, sizeof(ngx_listening_t)); | 430 ngx_memzero(ls, sizeof(ngx_listening_t)); |
435 | 431 |
436 ngx_test_null(addr_in, | 432 ngx_test_null(addr_in, |
437 ngx_pcalloc(cf->pool, sizeof(struct sockaddr_in)), | 433 ngx_pcalloc(cf->pool, sizeof(struct sockaddr_in)), |
451 (char *) &in_addr[a].addr, | 447 (char *) &in_addr[a].addr, |
452 ls->addr_text.data, | 448 ls->addr_text.data, |
453 INET_ADDRSTRLEN), | 449 INET_ADDRSTRLEN), |
454 6, ":%d", in_port[p].port); | 450 6, ":%d", in_port[p].port); |
455 | 451 |
452 ls->fd = -1; | |
456 ls->family = AF_INET; | 453 ls->family = AF_INET; |
457 ls->type = SOCK_STREAM; | 454 ls->type = SOCK_STREAM; |
458 ls->protocol = IPPROTO_IP; | 455 ls->protocol = IPPROTO_IP; |
459 #if (WIN32) | 456 #if (WIN32) |
460 ls->flags = WSA_FLAG_OVERLAPPED; | 457 ls->flags = WSA_FLAG_OVERLAPPED; |