diff src/event/ngx_event.c @ 323:ba876b26b76d

nginx-0.0.3-2004-04-21-22:54:33 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 21 Apr 2004 18:54:33 +0000
parents 11ff50a35d6d
children 7c3323909107
line wrap: on
line diff
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -56,6 +56,7 @@ ngx_atomic_t                     *ngx_ac
 ngx_atomic_t                     *ngx_accept_mutex;
 ngx_uint_t                        ngx_accept_mutex_held;
 ngx_msec_t                        ngx_accept_mutex_delay;
+ngx_int_t                         ngx_accept_disabled;
 
 
 
@@ -464,13 +465,13 @@ static char *ngx_event_connections(ngx_c
 
     ngx_str_t  *value;
 
-    if (ecf->connections != NGX_CONF_UNSET) {
+    if (ecf->connections != NGX_CONF_UNSET_UINT) {
         return "is duplicate" ;
     }
 
     value = cf->args->elts;
     ecf->connections = ngx_atoi(value[1].data, value[1].len);
-    if (ecf->connections == NGX_ERROR) {
+    if (ecf->connections == (ngx_uint_t) NGX_ERROR) {
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "invalid number \"%s\"", value[1].data);
 
@@ -598,7 +599,7 @@ static void *ngx_event_create_conf(ngx_c
     ngx_test_null(ecf, ngx_palloc(cycle->pool, sizeof(ngx_event_conf_t)),
                   NGX_CONF_ERROR);
 
-    ecf->connections = NGX_CONF_UNSET;
+    ecf->connections = NGX_CONF_UNSET_UINT;
     ecf->use = NGX_CONF_UNSET;
     ecf->multi_accept = NGX_CONF_UNSET;
     ecf->accept_mutex = NGX_CONF_UNSET;
@@ -620,25 +621,25 @@ static char *ngx_event_init_conf(ngx_cyc
 
 #if (HAVE_KQUEUE)
 
-    ngx_conf_init_value(ecf->connections, DEFAULT_CONNECTIONS);
+    ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS);
     ngx_conf_init_value(ecf->use, ngx_kqueue_module.ctx_index);
     ngx_conf_init_ptr_value(ecf->name, ngx_kqueue_module_ctx.name->data);
 
 #elif (HAVE_DEVPOLL)
 
-    ngx_conf_init_value(ecf->connections, DEFAULT_CONNECTIONS);
+    ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS);
     ngx_conf_init_value(ecf->use, ngx_devpoll_module.ctx_index);
     ngx_conf_init_ptr_value(ecf->name, ngx_devpoll_module_ctx.name->data);
 
 #elif (HAVE_EPOLL)
 
-    ngx_conf_init_value(ecf->connections, DEFAULT_CONNECTIONS);
+    ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS);
     ngx_conf_init_value(ecf->use, ngx_epoll_module.ctx_index);
     ngx_conf_init_ptr_value(ecf->name, ngx_epoll_module_ctx.name->data);
 
 #elif (HAVE_SELECT)
 
-    ngx_conf_init_value(ecf->connections,
+    ngx_conf_init_unsigned_value(ecf->connections,
           FD_SETSIZE < DEFAULT_CONNECTIONS ? FD_SETSIZE : DEFAULT_CONNECTIONS);
 
     ngx_conf_init_value(ecf->use, ngx_select_module.ctx_index);