comparison src/mail/ngx_mail_proxy_module.c @ 475:96428109ec3b

Merge with nginx 0.7.31.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 26 Jan 2009 03:15:35 +0300
parents 2c989ee54dbd ce4f9ff90bfa
children c78a94ba4ae1
comparison
equal deleted inserted replaced
472:b2e9a7371d49 475:96428109ec3b
102 NULL, /* exit master */ 102 NULL, /* exit master */
103 NGX_MODULE_V1_PADDING 103 NGX_MODULE_V1_PADDING
104 }; 104 };
105 105
106 106
107 static u_char smtp_ok[] = "235 2.0.0 OK" CRLF; 107 static u_char smtp_auth_ok[] = "235 2.0.0 OK" CRLF;
108 108
109 109
110 void 110 void
111 ngx_mail_proxy_init(ngx_mail_session_t *s, ngx_peer_addr_t *peer) 111 ngx_mail_proxy_init(ngx_mail_session_t *s, ngx_peer_addr_t *peer)
112 { 112 {
612 612
613 if (s->auth_method == NGX_MAIL_AUTH_NONE) { 613 if (s->auth_method == NGX_MAIL_AUTH_NONE) {
614 b->pos = b->start; 614 b->pos = b->start;
615 615
616 } else { 616 } else {
617 ngx_memcpy(b->start, smtp_ok, sizeof(smtp_ok) - 1); 617 ngx_memcpy(b->start, smtp_auth_ok, sizeof(smtp_auth_ok) - 1);
618 b->last = b->start + sizeof(smtp_ok) - 1; 618 b->last = b->start + sizeof(smtp_auth_ok) - 1;
619 } 619 }
620 620
621 s->connection->read->handler = ngx_mail_proxy_handler; 621 s->connection->read->handler = ngx_mail_proxy_handler;
622 s->connection->write->handler = ngx_mail_proxy_handler; 622 s->connection->write->handler = ngx_mail_proxy_handler;
623 rev->handler = ngx_mail_proxy_handler; 623 rev->handler = ngx_mail_proxy_handler;