From 61490aa6b617352d87b0fd58f265bace443e9e5e Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 1 Nov 2009 19:29:49 +0000 Subject: [PATCH] delete unused field c->local_socklen --- src/core/ngx_connection.c | 1 - src/core/ngx_connection.h | 1 - src/event/ngx_event_accept.c | 1 - src/event/ngx_event_acceptex.c | 3 ++- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index 6056c3f40..9d064c5ac 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -894,7 +894,6 @@ ngx_connection_local_sockaddr(ngx_connection_t *c, ngx_str_t *s, return NGX_ERROR; } - c->local_socklen = len; ngx_memcpy(c->local_sockaddr, &sa, len); } diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h index ebc0c4c14..1810daca0 100644 --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -129,7 +129,6 @@ struct ngx_connection_s { #endif struct sockaddr *local_sockaddr; - socklen_t local_socklen; ngx_buf_t *buffer; diff --git a/src/event/ngx_event_accept.c b/src/event/ngx_event_accept.c index 2bdccd9d3..ed5762e18 100644 --- a/src/event/ngx_event_accept.c +++ b/src/event/ngx_event_accept.c @@ -152,7 +152,6 @@ ngx_event_accept(ngx_event_t *ev) c->socklen = socklen; c->listening = ls; c->local_sockaddr = ls->sockaddr; - c->local_socklen = ls->socklen; c->unexpected_eof = 1; diff --git a/src/event/ngx_event_acceptex.c b/src/event/ngx_event_acceptex.c index c4b92e0ab..4e9db1ee0 100644 --- a/src/event/ngx_event_acceptex.c +++ b/src/event/ngx_event_acceptex.c @@ -17,6 +17,7 @@ ngx_event_acceptex(ngx_event_t *rev) { ngx_listening_t *ls; ngx_connection_t *c; + socklen_t len; c = rev->data; ls = c->listening; @@ -48,7 +49,7 @@ ngx_event_acceptex(ngx_event_t *rev) ls->post_accept_buffer_size, ls->socklen + 16, ls->socklen + 16, - &c->local_sockaddr, &c->local_socklen, + &c->local_sockaddr, &len, &c->sockaddr, &c->socklen); if (ls->post_accept_buffer_size) {