mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 14:13:33 -06:00
nginx-0.0.10-2004-08-31-23:05:39 import
This commit is contained in:
parent
13836ce3e6
commit
9e51181229
34
src/imap/ngx_imap_proxy.c
Normal file
34
src/imap/ngx_imap_proxy.c
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_event.h>
|
||||
|
||||
|
||||
static ngx_command_t ngx_imap_commands[] = {
|
||||
|
||||
{ ngx_string("imap"),
|
||||
NGX_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
|
||||
ngx_imap_block,
|
||||
0,
|
||||
0,
|
||||
NULL },
|
||||
|
||||
ngx_null_command
|
||||
};
|
||||
|
||||
|
||||
static ngx_core_module_t ngx_imap_module_ctx = {
|
||||
ngx_string("imap"),
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
ngx_module_t ngx_imap_module = {
|
||||
NGX_MODULE,
|
||||
&ngx_imap_module_ctx, /* module context */
|
||||
ngx_imap_commands, /* module directives */
|
||||
NGX_CORE_MODULE, /* module type */
|
||||
NULL, /* init module */
|
||||
NULL /* init child */
|
||||
};
|
19
src/imap/ngx_imap_proxy_handler.c
Normal file
19
src/imap/ngx_imap_proxy_handler.c
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_event.h>
|
||||
|
||||
|
||||
void ngx_imap_proxy_init_connection(ngx_connection_t *c)
|
||||
{
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_IMAP, c->log, 0,
|
||||
"imap proxy init connection");
|
||||
|
||||
if (ngx_close_socket(c->fd) == -1) {
|
||||
|
||||
/* we use ngx_cycle->log because c->log was in c->pool */
|
||||
|
||||
ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, ngx_socket_errno,
|
||||
ngx_close_socket_n " failed");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user