Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/imap/ngx_imap_handler.c')
-rw-r--r--src/imap/ngx_imap_handler.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/imap/ngx_imap_handler.c b/src/imap/ngx_imap_handler.c
new file mode 100644
index 000000000..635ae020c
--- /dev/null
+++ b/src/imap/ngx_imap_handler.c
@@ -0,0 +1,19 @@
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+#include <ngx_event.h>
+
+
+void ngx_imap_init_connection(ngx_connection_t *c)
+{
+ ngx_log_debug0(NGX_LOG_DEBUG_IMAP, c->log, 0,
+ "imap 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");
+ }
+}