diff options
author | Ruslan Ermilov <ru@nginx.com> | 2013-12-19 13:43:18 +0400 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2013-12-19 13:43:18 +0400 |
commit | bf800822dfd27e75a610f8474a672860ec9145d4 (patch) | |
tree | 4fa6a279b7d131a5b2cb2c461bc2c43de6e701a3 /src/core/ngx_connection.c | |
parent | 37b7de6df74b29153b4bfd0da5bef28fb4dbda77 (diff) | |
download | nginx-bf800822dfd27e75a610f8474a672860ec9145d4.tar.gz nginx-bf800822dfd27e75a610f8474a672860ec9145d4.zip |
Fixed the first argument to getsockopt().
While here, always initialize the last argument.
Diffstat (limited to 'src/core/ngx_connection.c')
-rw-r--r-- | src/core/ngx_connection.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index 57e26912d..08a547d42 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -199,7 +199,9 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle) #if (NGX_HAVE_SETFIB) - if (getsockopt(ls[i].setfib, SOL_SOCKET, SO_SETFIB, + olen = sizeof(int); + + if (getsockopt(ls[i].fd, SOL_SOCKET, SO_SETFIB, (void *) &ls[i].setfib, &olen) == -1) { @@ -215,7 +217,9 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle) #if (NGX_HAVE_TCP_FASTOPEN) - if (getsockopt(ls[i].fastopen, IPPROTO_TCP, TCP_FASTOPEN, + olen = sizeof(int); + + if (getsockopt(ls[i].fd, IPPROTO_TCP, TCP_FASTOPEN, (void *) &ls[i].fastopen, &olen) == -1) { |