Klaus Demo nginx / 183f71e
rename variable Igor Sysoev 15 years ago
1 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
2020 void
2121 ngx_event_accept(ngx_event_t *ev)
2222 {
23 socklen_t sl;
23 socklen_t socklen;
2424 ngx_err_t err;
2525 ngx_log_t *log;
2626 ngx_socket_t s;
4747 "accept on %V, ready: %d", &ls->addr_text, ev->available);
4848
4949 do {
50 sl = NGX_SOCKLEN;
51
52 s = accept(lc->fd, (struct sockaddr *) sa, &sl);
50 socklen = NGX_SOCKLEN;
51
52 s = accept(lc->fd, (struct sockaddr *) sa, &socklen);
5353
5454 if (s == -1) {
5555 err = ngx_socket_errno;
103103 return;
104104 }
105105
106 c->sockaddr = ngx_palloc(c->pool, sl);
106 c->sockaddr = ngx_palloc(c->pool, socklen);
107107 if (c->sockaddr == NULL) {
108108 ngx_close_accepted_connection(c);
109109 return;
110110 }
111111
112 ngx_memcpy(c->sockaddr, sa, sl);
112 ngx_memcpy(c->sockaddr, sa, socklen);
113113
114114 log = ngx_palloc(c->pool, sizeof(ngx_log_t));
115115 if (log == NULL) {
151151 c->pool->log = log;
152152
153153 c->listening = ls;
154 c->socklen = sl;
154 c->socklen = socklen;
155155
156156 c->unexpected_eof = 1;
157157