[PATCH][bugfix] Upstream: clear the delayed flag to prevent blocking from sending.
Maxim Dounin
mdounin at mdounin.ru
Mon Apr 3 16:47:41 UTC 2017
Hello!
On Mon, Apr 03, 2017 at 04:02:07PM +0800, 胡聪 (hucc) wrote:
[...]
> At the same time, I noticed that the type of rc is int not ngx_int_t in
> ngx_http_writer(). The type should be ngx_int_t, right? There was a time the
> return type of ngx_http_writer() is int. Later, it became void. Since then there
> is no need to do type conversion.
The "int" here was introduced at the time when there were no
ngx_int_t and all functions simply used int. When ngx_int_t was
introduced and relevant functions was changed to use it, the type
in ngx_http_writer() wasn't changed. This isn't a problem as
there is no real difference, though it certainly make sense to use
correct type here at least from style point of view.
>
> # HG changeset patch
> # User hucongcong <hucong.c at foxmail.com>
> # Date 1491200980 -28800
> # Mon Apr 03 14:29:40 2017 +0800
> # Node ID 7c3a0b951d0209612fb50a48abcb10c6ceffbff7
> # Parent 903fb1ddc07f6b4345d88428898d95aadfc0223f
> fix type
>
> diff -r 903fb1ddc07f -r 7c3a0b951d02 src/http/ngx_http_request.c
> --- a/src/http/ngx_http_request.c Sun Apr 02 14:32:29 2017 +0300
> +++ b/src/http/ngx_http_request.c Mon Apr 03 14:29:40 2017 +0800
> @@ -2612,7 +2612,7 @@ ngx_http_set_write_handler(ngx_http_requ
> static void
> ngx_http_writer(ngx_http_request_t *r)
> {
> - int rc;
> + ngx_int_t rc;
> ngx_event_t *wev;
> ngx_connection_t *c;
> ngx_http_core_loc_conf_t *clcf;
> @@ -2652,7 +2652,7 @@ ngx_http_writer(ngx_http_request_t *r)
> rc = ngx_http_output_filter(r, NULL);
>
> ngx_log_debug3(NGX_LOG_DEBUG_HTTP, c->log, 0,
> - "http writer output filter: %d, \"%V?%V\"",
> + "http writer output filter: %i, \"%V?%V\"",
> rc, &r->uri, &r->args);
>
> if (rc == NGX_ERROR) {
Committed with the commit log changed to match our style, thanks.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list