Mercurial > hg > nginx
comparison src/mail/ngx_mail_handler.c @ 1477:59e1caf2be94
style fix and optimizations
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 13 Sep 2007 20:27:28 +0000 |
parents | 67578e966dcc |
children | 2647950e047f |
comparison
equal
deleted
inserted
replaced
1476:67578e966dcc | 1477:59e1caf2be94 |
---|---|
30 ngx_mail_imap_init_protocol, | 30 ngx_mail_imap_init_protocol, |
31 ngx_mail_smtp_init_protocol | 31 ngx_mail_smtp_init_protocol |
32 }; | 32 }; |
33 | 33 |
34 | 34 |
35 static ngx_mail_parse_pt ngx_mail_parse[] = { | 35 static ngx_mail_parse_command_pt ngx_mail_parse_commands[] = { |
36 ngx_pop3_parse_command, | 36 ngx_mail_pop3_parse_command, |
37 ngx_imap_parse_command, | 37 ngx_mail_imap_parse_command, |
38 ngx_smtp_parse_command | 38 ngx_mail_smtp_parse_command |
39 }; | 39 }; |
40 | 40 |
41 | 41 |
42 static ngx_str_t internal_server_errors[] = { | 42 static ngx_str_t internal_server_errors[] = { |
43 ngx_string("-ERR internal server error" CRLF), | 43 ngx_string("-ERR internal server error" CRLF), |
544 } | 544 } |
545 | 545 |
546 return NGX_AGAIN; | 546 return NGX_AGAIN; |
547 } | 547 } |
548 | 548 |
549 rc = ngx_mail_parse[s->protocol](s); | 549 rc = ngx_mail_parse_commands[s->protocol](s); |
550 | 550 |
551 if (rc == NGX_AGAIN) { | 551 if (rc == NGX_AGAIN) { |
552 | 552 |
553 if (s->buffer->last < s->buffer->end) { | 553 if (s->buffer->last < s->buffer->end) { |
554 return rc; | 554 return rc; |