Mercurial > hg > nginx
comparison src/core/ngx_connection.c @ 5488:c51b9491b0bd
Fixed the first argument to getsockopt().
While here, always initialize the last argument.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 19 Dec 2013 13:43:18 +0400 |
parents | 30e806b8636a |
children | fdb67cfc957d |
comparison
equal
deleted
inserted
replaced
5487:a297b7ad6f94 | 5488:c51b9491b0bd |
---|---|
197 #if 0 | 197 #if 0 |
198 /* SO_SETFIB is currently a set only option */ | 198 /* SO_SETFIB is currently a set only option */ |
199 | 199 |
200 #if (NGX_HAVE_SETFIB) | 200 #if (NGX_HAVE_SETFIB) |
201 | 201 |
202 if (getsockopt(ls[i].setfib, SOL_SOCKET, SO_SETFIB, | 202 olen = sizeof(int); |
203 | |
204 if (getsockopt(ls[i].fd, SOL_SOCKET, SO_SETFIB, | |
203 (void *) &ls[i].setfib, &olen) | 205 (void *) &ls[i].setfib, &olen) |
204 == -1) | 206 == -1) |
205 { | 207 { |
206 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno, | 208 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno, |
207 "getsockopt(SO_SETFIB) %V failed, ignored", | 209 "getsockopt(SO_SETFIB) %V failed, ignored", |
213 #endif | 215 #endif |
214 #endif | 216 #endif |
215 | 217 |
216 #if (NGX_HAVE_TCP_FASTOPEN) | 218 #if (NGX_HAVE_TCP_FASTOPEN) |
217 | 219 |
218 if (getsockopt(ls[i].fastopen, IPPROTO_TCP, TCP_FASTOPEN, | 220 olen = sizeof(int); |
221 | |
222 if (getsockopt(ls[i].fd, IPPROTO_TCP, TCP_FASTOPEN, | |
219 (void *) &ls[i].fastopen, &olen) | 223 (void *) &ls[i].fastopen, &olen) |
220 == -1) | 224 == -1) |
221 { | 225 { |
222 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno, | 226 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno, |
223 "getsockopt(TCP_FASTOPEN) %V failed, ignored", | 227 "getsockopt(TCP_FASTOPEN) %V failed, ignored", |