From 5518aba253096193df31b0f64e7461d1ac224dfd Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 17 Dec 2002 15:48:27 +0000 Subject: nginx-0.0.1-2002-12-17-18:48:27 import --- src/http/ngx_http_event.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/http/ngx_http_event.c') diff --git a/src/http/ngx_http_event.c b/src/http/ngx_http_event.c index cbea0c682..60b3ca416 100644 --- a/src/http/ngx_http_event.c +++ b/src/http/ngx_http_event.c @@ -104,11 +104,11 @@ int ngx_http_init_connection(ngx_connection_t *c) ngx_test_null(c->addr_text.data, ngx_palloc(c->pool, c->addr_text.len), NGX_ERROR); - ngx_test_null(c->addr_text.len, - ngx_inet_ntop(c->family, - (char *)c->sockaddr + c->addr, - c->addr_text.data, c->addr_text.len), - NGX_ERROR); + c->addr_text.len = ngx_inet_ntop(c->family, + (char *)c->sockaddr + c->addr, + c->addr_text.data, c->addr_text.len); + if (c->addr_text.len = 0) + return NGX_ERROR; ngx_test_null(ctx, ngx_pcalloc(c->pool, sizeof(ngx_http_log_ctx_t)), NGX_ERROR); -- cgit