[PATCH] Variables: added $tcpinfo_retrans

Valentin V. Bartenev vbart at nginx.com
Mon Dec 21 12:22:37 UTC 2015


On Saturday 19 December 2015 03:43:28 Alexey Ivanov wrote:
> # HG changeset patch
> # User Alexey Ivanov <SaveTheRbtz at GMail.com>
> # Date 1450520577 28800
> #      Sat Dec 19 02:22:57 2015 -0800
> # Branch tcpi_retrans
> # Node ID 89e3d2427e669a060f23f70adbdd301f8916d11c
> # Parent  78b4e10b4367b31367aad3c83c9c3acdd42397c4
> Variables: added $tcpinfo_retrans
> 
> This one is useful for debugging poor network conditions.
> 
> diff -r 78b4e10b4367 -r 89e3d2427e66 src/http/ngx_http_variables.c
> --- a/src/http/ngx_http_variables.c	Thu Dec 17 16:39:15 2015 +0300
> +++ b/src/http/ngx_http_variables.c	Sat Dec 19 02:22:57 2015 -0800
> @@ -343,6 +343,9 @@
> 
>     { ngx_string("tcpinfo_rcv_space"), NULL, ngx_http_variable_tcpinfo,
>       3, NGX_HTTP_VAR_NOCACHEABLE, 0 },
> +
> +    { ngx_string("tcpinfo_retrans"), NULL, ngx_http_variable_tcpinfo,
> +      4, NGX_HTTP_VAR_NOCACHEABLE, 0 },
> #endif
[..]

Looks like your mail client have broken the patch.


> 
>     { ngx_null_string, NULL, NULL, 0, 0, 0 }
> @@ -1053,6 +1056,10 @@
>         value = ti.tcpi_rcv_space;
>         break;
> 
> +    case 4:
> +        value = ti.tcpi_retrans;
> +        break;
> +
>     /* suppress warning */
>     default:
>         value = 0;
> 

What if there is no "tcpi_retrans" field?

  wbr, Valentin V. Bartenev



More information about the nginx-devel mailing list