Mercurial > hg > nginx-vendor-current
diff src/os/unix/ngx_freebsd_init.c @ 646:615b5ea36fc0 NGINX_1_1_7
nginx 1.1.7
*) Feature: support of several resolvers in the "resolver" directive.
Thanks to Kirill A. Korinskiy.
*) Bugfix: a segmentation fault occurred on start or while
reconfiguration if the "ssl" directive was used at http level and
there was no "ssl_certificate" defined.
*) Bugfix: reduced memory consumption while proxying of big files if
they were buffered to disk.
*) Bugfix: a segmentation fault might occur in a worker process if
"proxy_http_version 1.1" directive was used.
*) Bugfix: in the "expires @time" directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 31 Oct 2011 00:00:00 +0400 |
parents | fd759445d8a8 |
children | d0f7a625f27c |
line wrap: on
line diff
--- a/src/os/unix/ngx_freebsd_init.c +++ b/src/os/unix/ngx_freebsd_init.c @@ -22,7 +22,8 @@ int ngx_freebsd_machdep_hlt_logical_ ngx_uint_t ngx_freebsd_sendfile_nbytes_bug; ngx_uint_t ngx_freebsd_use_tcp_nopush; -ngx_uint_t ngx_freebsd_debug_malloc; + +ngx_uint_t ngx_debug_malloc; static ngx_os_io_t ngx_freebsd_io = { @@ -80,7 +81,7 @@ ngx_debug_init() malloc_options = "J"; #endif - ngx_freebsd_debug_malloc = 1; + ngx_debug_malloc = 1; #else char *mo; @@ -88,7 +89,7 @@ ngx_debug_init() mo = getenv("MALLOC_OPTIONS"); if (mo && ngx_strchr(mo, 'J')) { - ngx_freebsd_debug_malloc = 1; + ngx_debug_malloc = 1; } #endif } @@ -97,7 +98,7 @@ ngx_debug_init() ngx_int_t ngx_os_specific_init(ngx_log_t *log) { - int version, somaxconn; + int version; size_t size; ngx_err_t err; ngx_uint_t i; @@ -209,12 +210,9 @@ ngx_os_specific_init(ngx_log_t *log) ngx_ncpu = ngx_freebsd_hw_ncpu; } - somaxconn = version < 600008 ? 32676 : 65535; - - if (ngx_freebsd_kern_ipc_somaxconn > somaxconn) { + if (version < 600008 && ngx_freebsd_kern_ipc_somaxconn > 32767) { ngx_log_error(NGX_LOG_ALERT, log, 0, - "sysctl kern.ipc.somaxconn must be no more than %d", - somaxconn); + "sysctl kern.ipc.somaxconn must be less than 32768"); return NGX_ERROR; }