comparison src/core/ngx_resolver.c @ 635:e67b227c8dbb default tip

Merge with current.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 25 Apr 2011 04:07:55 +0400
parents be70f83b184f
children
comparison
equal deleted inserted replaced
578:f3a9e57d2e17 635:e67b227c8dbb
136 r->resend_timeout = 5; 136 r->resend_timeout = 5;
137 r->expire = 30; 137 r->expire = 30;
138 r->valid = 300; 138 r->valid = 300;
139 139
140 r->log = &cf->cycle->new_log; 140 r->log = &cf->cycle->new_log;
141 r->log_level = NGX_LOG_ALERT; 141 r->log_level = NGX_LOG_ERR;
142 142
143 if (addr) { 143 if (addr) {
144 uc = ngx_calloc(sizeof(ngx_udp_connection_t), cf->log); 144 uc = ngx_calloc(sizeof(ngx_udp_connection_t), cf->log);
145 if (uc == NULL) { 145 if (uc == NULL) {
146 return NULL; 146 return NULL;
1834 query->nns_hi = 0; query->nns_lo = 0; 1834 query->nns_hi = 0; query->nns_lo = 0;
1835 query->nar_hi = 0; query->nar_lo = 0; 1835 query->nar_hi = 0; query->nar_lo = 0;
1836 1836
1837 p += sizeof(ngx_resolver_query_t); 1837 p += sizeof(ngx_resolver_query_t);
1838 1838
1839 for (n = 0; n < 32; n += 8){ 1839 for (n = 0; n < 32; n += 8) {
1840 d = ngx_sprintf(&p[1], "%ud", (ctx->addr >> n) & 0xff); 1840 d = ngx_sprintf(&p[1], "%ud", (ctx->addr >> n) & 0xff);
1841 *p = (u_char) (d - &p[1]); 1841 *p = (u_char) (d - &p[1]);
1842 p = d; 1842 p = d;
1843 } 1843 }
1844 1844