comparison src/core/ngx_connection.c @ 50:72eb30262aac NGINX_0_1_25

nginx 0.1.25 *) Bugfix: nginx did run on Linux parisc. *) Feature: nginx now does not start under FreeBSD if the sysctl kern.ipc.somaxconn value is too big. *) Bugfix: if a request was internally redirected by the ngx_http_index_module module to the ngx_http_proxy_module or ngx_http_fastcgi_module modules, then the index file was not closed after request completion. *) Feature: the "proxy_pass" can be used in location with regular expression. *) Feature: the ngx_http_rewrite_filter_module module supports the condition like "if ($HTTP_USER_AGENT ~ MSIE)". *) Bugfix: nginx started too slow if the large number of addresses and text values were used in the "geo" directive. *) Change: a variable name must be declared as "$name" in the "geo" directive. The previous variant without "$" is still supported, but will be removed soon. *) Feature: the "%{VARIABLE}v" logging parameter. *) Feature: the "set $name value" directive. *) Bugfix: gcc 4.0 compatibility. *) Feature: the --with-openssl-opt=OPTIONS autoconfiguration directive.
author Igor Sysoev <http://sysoev.ru>
date Sat, 19 Mar 2005 00:00:00 +0300
parents a39d1b793287
children 8ad297c88dcb
comparison
equal deleted inserted replaced
49:93dabbc9efb9 50:72eb30262aac
18 { 18 {
19 size_t len; 19 size_t len;
20 ngx_listening_t *ls; 20 ngx_listening_t *ls;
21 struct sockaddr_in *sin; 21 struct sockaddr_in *sin;
22 22
23 if (!(ls = ngx_array_push(&cf->cycle->listening))) { 23 ls = ngx_array_push(&cf->cycle->listening);
24 if (ls == NULL) {
24 return NULL; 25 return NULL;
25 } 26 }
26 27
27 ngx_memzero(ls, sizeof(ngx_listening_t)); 28 ngx_memzero(ls, sizeof(ngx_listening_t));
28 29
29 if (!(sin = ngx_pcalloc(cf->pool, sizeof(struct sockaddr_in)))) { 30 sin = ngx_pcalloc(cf->pool, sizeof(struct sockaddr_in));
31 if (sin == NULL) {
30 return NULL; 32 return NULL;
31 } 33 }
32 34
33 sin->sin_family = AF_INET; 35 sin->sin_family = AF_INET;
34 sin->sin_addr.s_addr = addr; 36 sin->sin_addr.s_addr = addr;
43 45
44 len = ngx_inet_ntop(AF_INET, &addr, ls->addr_text.data, INET_ADDRSTRLEN); 46 len = ngx_inet_ntop(AF_INET, &addr, ls->addr_text.data, INET_ADDRSTRLEN);
45 47
46 ls->addr_text.len = ngx_sprintf(ls->addr_text.data + len, ":%d", port) 48 ls->addr_text.len = ngx_sprintf(ls->addr_text.data + len, ":%d", port)
47 - ls->addr_text.data; 49 - ls->addr_text.data;
48
49 50
50 ls->fd = (ngx_socket_t) -1; 51 ls->fd = (ngx_socket_t) -1;
51 ls->family = AF_INET; 52 ls->family = AF_INET;
52 ls->type = SOCK_STREAM; 53 ls->type = SOCK_STREAM;
53 ls->sockaddr = (struct sockaddr *) sin; 54 ls->sockaddr = (struct sockaddr *) sin;