comparison src/http/ngx_http_request.c @ 419:47709bff4468

nginx-0.0.10-2004-09-09-19:40:48 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 09 Sep 2004 15:40:48 +0000
parents 0526206251f6
children fda5987b188d
comparison
equal deleted inserted replaced
418:cf072d26d6d6 419:47709bff4468
94 94
95 void ngx_http_init_connection(ngx_connection_t *c) 95 void ngx_http_init_connection(ngx_connection_t *c)
96 { 96 {
97 ngx_event_t *rev; 97 ngx_event_t *rev;
98 ngx_http_log_ctx_t *ctx; 98 ngx_http_log_ctx_t *ctx;
99
100 c->addr_text.data = ngx_palloc(c->pool, c->listening->addr_text_max_len);
101 if (c->addr_text.data == NULL) {
102 ngx_http_close_connection(c);
103 return;
104 }
105
106 c->addr_text.len = ngx_sock_ntop(c->listening->family, c->sockaddr,
107 c->addr_text.data,
108 c->listening->addr_text_max_len);
109
110 if (c->addr_text.len == 0) {
111 ngx_http_close_connection(c);
112 return;
113 }
114 99
115 if (!(ctx = ngx_pcalloc(c->pool, sizeof(ngx_http_log_ctx_t)))) { 100 if (!(ctx = ngx_pcalloc(c->pool, sizeof(ngx_http_log_ctx_t)))) {
116 ngx_http_close_connection(c); 101 ngx_http_close_connection(c);
117 return; 102 return;
118 } 103 }