Mercurial > hg > nginx-quic
comparison src/mail/ngx_mail_smtp_handler.c @ 3299:0b6277a58a2d
*) fix resolving an empty name ("."),
*) add quotes in an error message,
*) backout r3299 in ngx_mail_smtp_handler.c
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 09 Nov 2009 19:15:11 +0000 |
parents | 847ab5a32307 |
children | dd1570b6f237 |
comparison
equal
deleted
inserted
replaced
3298:847ab5a32307 | 3299:0b6277a58a2d |
---|---|
122 ngx_mail_smtp_greeting(s, s->connection); | 122 ngx_mail_smtp_greeting(s, s->connection); |
123 | 123 |
124 return; | 124 return; |
125 } | 125 } |
126 | 126 |
127 if (ctx->name.len == 0) { | |
128 ngx_log_error(NGX_LOG_ERR, c->log, 0, | |
129 "%V has been resolved to zero name", &c->addr_text); | |
130 | |
131 s->host = smtp_unavailable; | |
132 | |
133 ngx_resolve_addr_done(ctx); | |
134 | |
135 ngx_mail_smtp_greeting(s, s->connection); | |
136 | |
137 return; | |
138 } | |
139 | |
140 c->log->action = "in resolving client hostname"; | 127 c->log->action = "in resolving client hostname"; |
141 | 128 |
142 s->host.data = ngx_pstrdup(c->pool, &ctx->name); | 129 s->host.data = ngx_pstrdup(c->pool, &ctx->name); |
143 if (s->host.data == NULL) { | 130 if (s->host.data == NULL) { |
144 ngx_resolve_addr_done(ctx); | 131 ngx_resolve_addr_done(ctx); |
202 s = ctx->data; | 189 s = ctx->data; |
203 c = s->connection; | 190 c = s->connection; |
204 | 191 |
205 if (ctx->state) { | 192 if (ctx->state) { |
206 ngx_log_error(NGX_LOG_ERR, c->log, 0, | 193 ngx_log_error(NGX_LOG_ERR, c->log, 0, |
207 "%V could not be resolved (%i: %s)", | 194 "\"%V\" could not be resolved (%i: %s)", |
208 &ctx->name, ctx->state, | 195 &ctx->name, ctx->state, |
209 ngx_resolver_strerror(ctx->state)); | 196 ngx_resolver_strerror(ctx->state)); |
210 | 197 |
211 if (ctx->state == NGX_RESOLVE_NXDOMAIN) { | 198 if (ctx->state == NGX_RESOLVE_NXDOMAIN) { |
212 s->host = smtp_unavailable; | 199 s->host = smtp_unavailable; |