aboutsummaryrefslogtreecommitdiff
path: root/src/imap/ngx_imap_proxy_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-09-08 14:36:09 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-09-08 14:36:09 +0000
commite573380f247f4840dd27b40e76c587196a84f106 (patch)
tree2bf9b16bbd3f9213fcb05fe3962938f24bf02677 /src/imap/ngx_imap_proxy_module.c
parent6f8cd96a9b0394589fbcfa75e9d26ef4f881d51b (diff)
downloadnginx-e573380f247f4840dd27b40e76c587196a84f106.tar.gz
nginx-e573380f247f4840dd27b40e76c587196a84f106.zip
nginx-0.1.45-RELEASE importrelease-0.1.45
*) Change: the "ssl_engine" directive was canceled in the ngx_http_ssl_module and now is introduced at global level. *) Bugfix: the responses with SSI subrequests did not transferred via SSL connection. *) Various bug fixes in the IMAP/POP3 proxy.
Diffstat (limited to 'src/imap/ngx_imap_proxy_module.c')
-rw-r--r--src/imap/ngx_imap_proxy_module.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/imap/ngx_imap_proxy_module.c b/src/imap/ngx_imap_proxy_module.c
index f9a84ce55..5502dc617 100644
--- a/src/imap/ngx_imap_proxy_module.c
+++ b/src/imap/ngx_imap_proxy_module.c
@@ -77,8 +77,14 @@ ngx_module_t ngx_imap_proxy_module = {
&ngx_imap_proxy_module_ctx, /* module context */
ngx_imap_proxy_commands, /* module directives */
NGX_IMAP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
@@ -101,9 +107,11 @@ ngx_imap_proxy_init(ngx_imap_session_t *s, ngx_peers_t *peers)
p->upstream.log = s->connection->log;
p->upstream.log_error = NGX_ERROR_ERR;
+ s->connection->log->action = "in upstream auth state";
+
rc = ngx_event_connect_peer(&p->upstream);
- if (rc == NGX_ERROR) {
+ if (rc == NGX_ERROR || rc == NGX_CONNECT_ERROR) {
ngx_imap_session_internal_server_error(s);
return;
}
@@ -284,6 +292,8 @@ ngx_imap_proxy_imap_handler(ngx_event_t *rev)
pcf = ngx_imap_get_module_srv_conf(s, ngx_imap_proxy_module);
ngx_add_timer(s->connection->read, pcf->timeout);
ngx_del_timer(c->read);
+
+ c->log->action = "proxying";
}
}
@@ -407,6 +417,8 @@ ngx_imap_proxy_pop3_handler(ngx_event_t *rev)
pcf = ngx_imap_get_module_srv_conf(s, ngx_imap_proxy_module);
ngx_add_timer(s->connection->read, pcf->timeout);
ngx_del_timer(c->read);
+
+ c->log->action = "proxying";
}
}