comparison src/mail/ngx_mail_imap_handler.c @ 1704:e584e946e198

move condition declarations inside blocks where they are used
author Igor Sysoev <igor@sysoev.ru>
date Mon, 10 Dec 2007 12:09:51 +0000
parents f69493e8faab
children 2a92804f4109 62c95a6b143b
comparison
equal deleted inserted replaced
1703:43747661804d 1704:e584e946e198
300 300
301 301
302 static ngx_int_t 302 static ngx_int_t
303 ngx_mail_imap_login(ngx_mail_session_t *s, ngx_connection_t *c) 303 ngx_mail_imap_login(ngx_mail_session_t *s, ngx_connection_t *c)
304 { 304 {
305 ngx_str_t *arg; 305 ngx_str_t *arg;
306 306
307 #if (NGX_MAIL_SSL) 307 #if (NGX_MAIL_SSL)
308 if (ngx_mail_starttls_only(s, c)) { 308 if (ngx_mail_starttls_only(s, c)) {
309 return NGX_MAIL_PARSE_INVALID_COMMAND; 309 return NGX_MAIL_PARSE_INVALID_COMMAND;
310 } 310 }
408 408
409 static ngx_int_t 409 static ngx_int_t
410 ngx_mail_imap_capability(ngx_mail_session_t *s, ngx_connection_t *c) 410 ngx_mail_imap_capability(ngx_mail_session_t *s, ngx_connection_t *c)
411 { 411 {
412 ngx_mail_imap_srv_conf_t *iscf; 412 ngx_mail_imap_srv_conf_t *iscf;
413
414 iscf = ngx_mail_get_module_srv_conf(s, ngx_mail_imap_module);
415
413 #if (NGX_MAIL_SSL) 416 #if (NGX_MAIL_SSL)
414 ngx_mail_ssl_conf_t *sslcf;
415 #endif
416
417 iscf = ngx_mail_get_module_srv_conf(s, ngx_mail_imap_module);
418
419 #if (NGX_MAIL_SSL)
420 417
421 if (c->ssl == NULL) { 418 if (c->ssl == NULL) {
419 ngx_mail_ssl_conf_t *sslcf;
420
422 sslcf = ngx_mail_get_module_srv_conf(s, ngx_mail_ssl_module); 421 sslcf = ngx_mail_get_module_srv_conf(s, ngx_mail_ssl_module);
423 422
424 if (sslcf->starttls == NGX_MAIL_STARTTLS_ON) { 423 if (sslcf->starttls == NGX_MAIL_STARTTLS_ON) {
425 s->text = iscf->starttls_capability; 424 s->text = iscf->starttls_capability;
426 return NGX_OK; 425 return NGX_OK;