rename variable
This commit is contained in:
parent
8de7b43358
commit
41737436a5
1 changed files with 6 additions and 6 deletions
|
@ -21,7 +21,7 @@ static void ngx_close_accepted_connection(ngx_connection_t *c);
|
|||
void
|
||||
ngx_event_accept(ngx_event_t *ev)
|
||||
{
|
||||
socklen_t sl;
|
||||
socklen_t socklen;
|
||||
ngx_err_t err;
|
||||
ngx_log_t *log;
|
||||
ngx_socket_t s;
|
||||
|
@ -48,9 +48,9 @@ ngx_event_accept(ngx_event_t *ev)
|
|||
"accept on %V, ready: %d", &ls->addr_text, ev->available);
|
||||
|
||||
do {
|
||||
sl = NGX_SOCKLEN;
|
||||
socklen = NGX_SOCKLEN;
|
||||
|
||||
s = accept(lc->fd, (struct sockaddr *) sa, &sl);
|
||||
s = accept(lc->fd, (struct sockaddr *) sa, &socklen);
|
||||
|
||||
if (s == -1) {
|
||||
err = ngx_socket_errno;
|
||||
|
@ -104,13 +104,13 @@ ngx_event_accept(ngx_event_t *ev)
|
|||
return;
|
||||
}
|
||||
|
||||
c->sockaddr = ngx_palloc(c->pool, sl);
|
||||
c->sockaddr = ngx_palloc(c->pool, socklen);
|
||||
if (c->sockaddr == NULL) {
|
||||
ngx_close_accepted_connection(c);
|
||||
return;
|
||||
}
|
||||
|
||||
ngx_memcpy(c->sockaddr, sa, sl);
|
||||
ngx_memcpy(c->sockaddr, sa, socklen);
|
||||
|
||||
log = ngx_palloc(c->pool, sizeof(ngx_log_t));
|
||||
if (log == NULL) {
|
||||
|
@ -152,7 +152,7 @@ ngx_event_accept(ngx_event_t *ev)
|
|||
c->pool->log = log;
|
||||
|
||||
c->listening = ls;
|
||||
c->socklen = sl;
|
||||
c->socklen = socklen;
|
||||
|
||||
c->unexpected_eof = 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue