comparison src/mail/ngx_mail_smtp_module.c @ 1892:057d362ee50e

resolver in smtp proxy module
author Igor Sysoev <igor@sysoev.ru>
date Wed, 13 Feb 2008 13:50:04 +0000
parents f69493e8faab
children 4c060e30476b
comparison
equal deleted inserted replaced
1891:782af1038115 1892:057d362ee50e
156 |NGX_MAIL_AUTH_LOGIN_ENABLED)); 156 |NGX_MAIL_AUTH_LOGIN_ENABLED));
157 157
158 158
159 cscf = ngx_mail_conf_get_module_srv_conf(cf, ngx_mail_core_module); 159 cscf = ngx_mail_conf_get_module_srv_conf(cf, ngx_mail_core_module);
160 160
161 if (cscf->protocol->type == NGX_MAIL_SMTP_PROTOCOL
162 && cscf->resolver == NULL)
163 {
164 ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
165 "undefined resolver for server in %s:%ui",
166 cscf->file_name, cscf->line);
167 return NGX_CONF_ERROR;
168 }
169
161 size = sizeof("220 ESMTP ready" CRLF) - 1 + cscf->server_name.len; 170 size = sizeof("220 ESMTP ready" CRLF) - 1 + cscf->server_name.len;
162 171
163 p = ngx_palloc(cf->pool, size); 172 p = ngx_palloc(cf->pool, size);
164 if (p == NULL) { 173 if (p == NULL) {
165 return NGX_CONF_ERROR; 174 return NGX_CONF_ERROR;