[nginx] Removed unused flag accept_context_updated from ngx_event_t.

Ruslan Ermilov ru at nginx.com
Thu Jun 30 09:36:05 UTC 2016


details:   http://hg.nginx.org/nginx/rev/bcd442b585f0
branches:  
changeset: 6602:bcd442b585f0
user:      Ruslan Ermilov <ru at nginx.com>
date:      Wed Jun 29 14:30:00 2016 +0300
description:
Removed unused flag accept_context_updated from ngx_event_t.

Also, removed practically unused flag accept_context_updated from
ngx_connection_t.

diffstat:

 src/core/ngx_connection.h      |  4 ----
 src/event/ngx_event.h          |  5 -----
 src/event/ngx_event_acceptex.c |  4 ++--
 3 files changed, 2 insertions(+), 11 deletions(-)

diffs (43 lines):

diff -r d452cb27639f -r bcd442b585f0 src/core/ngx_connection.h
--- a/src/core/ngx_connection.h	Mon Jun 27 18:42:29 2016 +0300
+++ b/src/core/ngx_connection.h	Wed Jun 29 14:30:00 2016 +0300
@@ -186,10 +186,6 @@ struct ngx_connection_s {
 
     unsigned            need_last_buf:1;
 
-#if (NGX_HAVE_IOCP)
-    unsigned            accept_context_updated:1;
-#endif
-
 #if (NGX_HAVE_AIO_SENDFILE)
     unsigned            busy_count:2;
 #endif
diff -r d452cb27639f -r bcd442b585f0 src/event/ngx_event.h
--- a/src/event/ngx_event.h	Mon Jun 27 18:42:29 2016 +0300
+++ b/src/event/ngx_event.h	Wed Jun 29 14:30:00 2016 +0300
@@ -76,11 +76,6 @@ struct ngx_event_s {
 
     unsigned         cancelable:1;
 
-#if (NGX_WIN32)
-    /* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was successful */
-    unsigned         accept_context_updated:1;
-#endif
-
 #if (NGX_HAVE_KQUEUE)
     unsigned         kq_vnode:1;
 
diff -r d452cb27639f -r bcd442b585f0 src/event/ngx_event_acceptex.c
--- a/src/event/ngx_event_acceptex.c	Mon Jun 27 18:42:29 2016 +0300
+++ b/src/event/ngx_event_acceptex.c	Wed Jun 29 14:30:00 2016 +0300
@@ -41,8 +41,8 @@ ngx_event_acceptex(ngx_event_t *rev)
         ngx_log_error(NGX_LOG_CRIT, c->log, ngx_socket_errno,
                       "setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed for %V",
                       &c->addr_text);
-    } else {
-        c->accept_context_updated = 1;
+        /* TODO: close socket */
+        return;
     }
 
     ngx_getacceptexsockaddrs(c->buffer->pos,



More information about the nginx-devel mailing list