nginx-0.0.1-2003-07-07-10:11:50 import
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index b9a8528..cc1f8e8 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -69,7 +69,6 @@
 
     *(ngx_http_conf_ctx_t **) conf = ctx;
 
-
     /* count the number of the http modules and set up their indices */
 
     ngx_http_max_module = 0;
@@ -273,9 +272,9 @@
                                                    & NGX_HTTP_DEFAULT_SERVER) {
 
                                     ngx_log_error(NGX_LOG_ERR, cf->log, 0,
-                                        "duplicate default server in %s:%d",
-                                        lscf[l].file_name.data,
-                                        lscf[l].line);
+                                           "duplicate default server in %s:%d",
+                                           lscf[l].file_name.data,
+                                           lscf[l].line);
 
                                     return NGX_CONF_ERROR;
                                 }
@@ -471,7 +470,7 @@
             ls->post_accept_timeout = cscf->post_accept_timeout;
 
 #if (WIN32)
-            iocpcf = ngx_event_get_conf(ngx_iocp_module);
+            iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module);
             if (iocpcf->acceptex_read) {
                 ls->post_accept_buffer_size = cscf->client_header_buffer_size;
             }
@@ -489,7 +488,7 @@
 
                     ngx_test_null(inport,
                                   ngx_palloc(cf->pool,
-                                                   sizeof(ngx_http_in_port_t)),
+                                             sizeof(ngx_http_in_port_t)),
                                   NGX_CONF_ERROR);
 
                     inport->port = in_port[p].port;
@@ -529,7 +528,7 @@
     /* DEBUG STUFF */
     in_port = in_ports.elts;
     for (p = 0; p < in_ports.nelts; p++) {
-ngx_log_debug(cf->log, "port: %d" _ in_port[p].port);
+ngx_log_debug(cf->log, "port: %d %08x" _ in_port[p].port _ &in_port[p]);
         in_addr = in_port[p].addrs.elts;
         for (a = 0; a < in_port[p].addrs.nelts; a++) {
             char ip[20];
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 7823eca..60a9fcf 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -867,6 +867,7 @@
     lcf->types = NULL;
     lcf->default_type.len = 0;
     lcf->default_type.data = NULL;
+    lcf->err_log = NULL;
 
     */
 
@@ -1050,3 +1051,20 @@
 
     return NGX_CONF_OK;
 }
+
+
+static char *ngx_set_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+{
+    ngx_http_core_loc_conf_t *lcf = conf;
+
+    ngx_str_t  *value;
+
+    value = cf->args->elts;
+
+    ngx_test_null(lcf->err_log, ngx_log_create_errlog(cf->cycle),
+                  NGX_CONF_ERROR);
+
+    lcf->err_log->file->name = value[1];
+
+    return NGX_CONF_OK;
+}
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
index c6b2bcc..08c1f02 100644
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -107,6 +107,7 @@
     ngx_msec_t    lingering_time;          /* lingering_time */
     ngx_msec_t    lingering_timeout;       /* lingering_timeout */
 
+    ngx_log_t    *err_log;
 } ngx_http_core_loc_conf_t;
 
 
diff --git a/src/http/ngx_http_event.c b/src/http/ngx_http_event.c
index 06a98a3..5531bac 100644
--- a/src/http/ngx_http_event.c
+++ b/src/http/ngx_http_event.c
@@ -152,6 +152,8 @@
     in_port = c->servers;
     in_addr = in_port->addrs.elts;
 
+ngx_log_debug(rev->log, "IN: %08x" _ in_port);
+
     r->port = in_port->port;
     r->port_name = &in_port->port_name;