Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Limit conn: Added "off" parameter to the 'limit_conn' directive

Valentin V. Bartenev
February 10, 2016 08:38AM
On Wednesday 10 February 2016 00:09:09 Pavel V. Rochnyack wrote:
> # HG changeset patch
> # User Pavel V. Rochnyack <pavel2000@ngs.ru>
> # Date 1454835814 -21600
> # Node ID b4748ebdd06ba79aa27e0c54fc1d627d13966bed
> # Parent 3577c021f21eb4de6d09c1d624ba77ee9ee1eb6d
> Limit conn: Added "off" parameter to the 'limit_conn' directive.
>
> Added support for inherited "limit_conn" directives disable.
>
> diff -r 3577c021f21e -r b4748ebdd06b src/http/modules/ngx_http_limit_conn_module.c
> --- a/src/http/modules/ngx_http_limit_conn_module.c Fri Feb 05 21:48:25 2016 +0300
> +++ b/src/http/modules/ngx_http_limit_conn_module.c Sun Feb 07 15:03:34 2016 +0600
> @@ -40,6 +40,7 @@ typedef struct {
> ngx_array_t limits;
> ngx_uint_t log_level;
> ngx_uint_t status_code;
> + ngx_uint_t off; /* unsigned off:1 */
> } ngx_http_limit_conn_conf_t;
[..]

Instead of adding additional flag, it should be possible to replace the "limits"
array with a pointer and use NULL as an indicator of the "off" value.

That should simplify the code.

wbr, Valentin V. Bartenev

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Limit conn: Added "off" parameter to the 'limit_conn' directive

Pavel V. Rochnyack 488 February 09, 2016 01:10PM

Re: [PATCH] Limit conn: Added "off" parameter to the 'limit_conn' directive

Maxim Dounin 245 February 09, 2016 11:18PM

Re: [PATCH] Limit conn: Added "off" parameter to the 'limit_conn' directive

Pavel V. 218 February 10, 2016 12:32AM

Re: [PATCH] Limit conn: Added "off" parameter to the 'limit_conn' directive

Maxim Dounin 247 February 10, 2016 08:54AM

Re: [PATCH] Limit conn: Added "off" parameter to the 'limit_conn' directive

Valentin V. Bartenev 195 February 10, 2016 08:38AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 163
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready