diff options
Diffstat (limited to 'src/event/ngx_event.c')
| -rw-r--r-- | src/event/ngx_event.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c index 002d2963c..cc03b5800 100644 --- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -56,6 +56,7 @@ ngx_atomic_t *ngx_accept_mutex_ptr; 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_conf_t *cf, ngx_command_t *cmd, 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_cycle_t *cycle) 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_cycle_t *cycle, void *conf) #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); |
