Mercurial > hg > nginx-vendor-current
comparison src/core/ngx_resolver.c @ 678:981b4c44593b NGINX_1_3_2
nginx 1.3.2
*) Change: the "single" parameter of the "keepalive" directive is now
ignored.
*) Change: SSL compression is now disabled when using all versions of
OpenSSL, including ones prior to 1.0.0.
*) Feature: it is now possible to use the "ip_hash" directive to balance
IPv6 clients.
*) Feature: the $status variable can now be used not only in the
"log_format" directive.
*) Bugfix: a segmentation fault might occur in a worker process on
shutdown if the "resolver" directive was used.
*) Bugfix: a segmentation fault might occur in a worker process if the
ngx_http_mp4_module was used.
*) Bugfix: in the ngx_http_mp4_module.
*) Bugfix: a segmentation fault might occur in a worker process if
conflicting wildcard server names were used.
*) Bugfix: nginx might be terminated abnormally on a SIGBUS signal on
ARM platform.
*) Bugfix: an alert "sendmsg() failed (9: Bad file number)" on HP-UX
while reconfiguration.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 26 Jun 2012 00:00:00 +0400 |
parents | bfa81a0490a2 |
children | 660139fd80ca |
comparison
equal
deleted
inserted
replaced
677:47f0934d8824 | 678:981b4c44593b |
---|---|
94 ngx_resolver_t * | 94 ngx_resolver_t * |
95 ngx_resolver_create(ngx_conf_t *cf, ngx_str_t *names, ngx_uint_t n) | 95 ngx_resolver_create(ngx_conf_t *cf, ngx_str_t *names, ngx_uint_t n) |
96 { | 96 { |
97 ngx_str_t s; | 97 ngx_str_t s; |
98 ngx_url_t u; | 98 ngx_url_t u; |
99 ngx_uint_t i; | 99 ngx_uint_t i, j; |
100 ngx_resolver_t *r; | 100 ngx_resolver_t *r; |
101 ngx_pool_cleanup_t *cln; | 101 ngx_pool_cleanup_t *cln; |
102 ngx_udp_connection_t *uc; | 102 ngx_udp_connection_t *uc; |
103 | 103 |
104 cln = ngx_pool_cleanup_add(cf->pool, 0); | 104 cln = ngx_pool_cleanup_add(cf->pool, 0); |
182 } | 182 } |
183 | 183 |
184 return NULL; | 184 return NULL; |
185 } | 185 } |
186 | 186 |
187 uc = ngx_array_push(&r->udp_connections); | 187 uc = ngx_array_push_n(&r->udp_connections, u.naddrs); |
188 if (uc == NULL) { | 188 if (uc == NULL) { |
189 return NULL; | 189 return NULL; |
190 } | 190 } |
191 | 191 |
192 ngx_memzero(uc, sizeof(ngx_udp_connection_t)); | 192 ngx_memzero(uc, u.naddrs * sizeof(ngx_udp_connection_t)); |
193 | 193 |
194 uc->sockaddr = u.addrs->sockaddr; | 194 for (j = 0; j < u.naddrs; j++) { |
195 uc->socklen = u.addrs->socklen; | 195 uc[j].sockaddr = u.addrs[j].sockaddr; |
196 uc->server = u.addrs->name; | 196 uc[j].socklen = u.addrs[j].socklen; |
197 uc[j].server = u.addrs[j].name; | |
198 } | |
197 } | 199 } |
198 | 200 |
199 return r; | 201 return r; |
200 } | 202 } |
201 | 203 |
975 | 977 |
976 ngx_queue_remove(q); | 978 ngx_queue_remove(q); |
977 | 979 |
978 if (rn->waiting) { | 980 if (rn->waiting) { |
979 | 981 |
980 if (ngx_resolver_send_query(r, rn) == NGX_OK) { | 982 (void) ngx_resolver_send_query(r, rn); |
981 | 983 |
982 rn->expire = now + r->resend_timeout; | 984 rn->expire = now + r->resend_timeout; |
983 | 985 |
984 ngx_queue_insert_head(queue, &rn->queue); | 986 ngx_queue_insert_head(queue, q); |
985 } | |
986 | 987 |
987 continue; | 988 continue; |
988 } | 989 } |
989 | 990 |
990 ngx_rbtree_delete(tree, &rn->node); | 991 ngx_rbtree_delete(tree, &rn->node); |