comparison src/core/ngx_resolver.c @ 664:f5b859b2f097 NGINX_1_1_16

nginx 1.1.16 *) Change: the simultaneous subrequest limit has been raised to 200. *) Feature: the "from" parameter of the "disable_symlinks" directive. *) Feature: the "return" and "error_page" directives can be used to return 307 redirections. *) Bugfix: a segmentation fault might occur in a worker process if the "resolver" directive was used and there was no "error_log" directive specified at global level. Thanks to Roman Arutyunyan. *) Bugfix: a segmentation fault might occur in a worker process if the "proxy_http_version 1.1" or "fastcgi_keep_conn on" directives were used. *) Bugfix: memory leaks. Thanks to Lanshun Zhou. *) Bugfix: in the "disable_symlinks" directive. *) Bugfix: on ZFS filesystem disk cache size might be calculated incorrectly; the bug had appeared in 1.0.1. *) Bugfix: nginx could not be built by the icc 12.1 compiler. *) Bugfix: nginx could not be built by gcc on Solaris; the bug had appeared in 1.1.15.
author Igor Sysoev <http://sysoev.ru>
date Wed, 29 Feb 2012 00:00:00 +0400
parents e5fa0a4a7d27
children 9fbf3ad94cbf
comparison
equal deleted inserted replaced
663:dd668cf20818 664:f5b859b2f097
187 ngx_memzero(uc, sizeof(ngx_udp_connection_t)); 187 ngx_memzero(uc, sizeof(ngx_udp_connection_t));
188 188
189 uc->sockaddr = u.addrs->sockaddr; 189 uc->sockaddr = u.addrs->sockaddr;
190 uc->socklen = u.addrs->socklen; 190 uc->socklen = u.addrs->socklen;
191 uc->server = u.addrs->name; 191 uc->server = u.addrs->name;
192
193 uc->log = cf->cycle->new_log;
194 uc->log.handler = ngx_resolver_log_error;
195 uc->log.data = uc;
196 uc->log.action = "resolving";
197 } 192 }
198 193
199 return r; 194 return r;
200 } 195 }
201 196
874 if (r->last_connection == r->udp_connections.nelts) { 869 if (r->last_connection == r->udp_connections.nelts) {
875 r->last_connection = 0; 870 r->last_connection = 0;
876 } 871 }
877 872
878 if (uc->connection == NULL) { 873 if (uc->connection == NULL) {
874
875 uc->log = *r->log;
876 uc->log.handler = ngx_resolver_log_error;
877 uc->log.data = uc;
878 uc->log.action = "resolving";
879
879 if (ngx_udp_connect(uc) != NGX_OK) { 880 if (ngx_udp_connect(uc) != NGX_OK) {
880 return NGX_ERROR; 881 return NGX_ERROR;
881 } 882 }
882 883
883 uc->connection->data = r; 884 uc->connection->data = r;
1686 continue; 1687 continue;
1687 } 1688 }
1688 1689
1689 /* hash == node->key */ 1690 /* hash == node->key */
1690 1691
1691 do { 1692 rn = (ngx_resolver_node_t *) node;
1692 rn = (ngx_resolver_node_t *) node; 1693
1693 1694 rc = ngx_memn2cmp(name->data, rn->name, name->len, rn->nlen);
1694 rc = ngx_memn2cmp(name->data, rn->name, name->len, rn->nlen); 1695
1695 1696 if (rc == 0) {
1696 if (rc == 0) { 1697 return rn;
1697 return rn; 1698 }
1698 } 1699
1699 1700 node = (rc < 0) ? node->left : node->right;
1700 node = (rc < 0) ? node->left : node->right;
1701
1702 } while (node != sentinel && hash == node->key);
1703
1704 break;
1705 } 1701 }
1706 1702
1707 /* not found */ 1703 /* not found */
1708 1704
1709 return NULL; 1705 return NULL;