diff options
Diffstat (limited to 'src/http')
-rw-r--r-- | src/http/modules/ngx_http_range_filter.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_stub_status_module.c | 24 | ||||
-rw-r--r-- | src/http/ngx_http_request.c | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/http/modules/ngx_http_range_filter.c b/src/http/modules/ngx_http_range_filter.c index 1eb4cc617..0049af6cb 100644 --- a/src/http/modules/ngx_http_range_filter.c +++ b/src/http/modules/ngx_http_range_filter.c @@ -113,7 +113,7 @@ ngx_http_range_header_filter(ngx_http_request_t *r) off_t start, end; ngx_int_t rc; ngx_uint_t suffix, i; - ngx_atomic_int_t boundary; + ngx_atomic_uint_t boundary; ngx_table_elt_t *content_range; ngx_http_range_t *range; ngx_http_range_filter_ctx_t *ctx; diff --git a/src/http/modules/ngx_http_stub_status_module.c b/src/http/modules/ngx_http_stub_status_module.c index 834beaa92..7eeef5986 100644 --- a/src/http/modules/ngx_http_stub_status_module.c +++ b/src/http/modules/ngx_http_stub_status_module.c @@ -47,11 +47,11 @@ ngx_module_t ngx_http_stub_status_module = { static ngx_int_t ngx_http_status_handler(ngx_http_request_t *r) { - size_t size; - ngx_int_t rc; - uint32_t ap, hn, ac, rq, rd, wr; - ngx_buf_t *b; - ngx_chain_t out; + size_t size; + ngx_int_t rc; + ngx_buf_t *b; + ngx_chain_t out; + ngx_atomic_int_t ap, hn, ac, rq, rd, wr; if (r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) { return NGX_HTTP_NOT_ALLOWED; @@ -83,10 +83,10 @@ static ngx_int_t ngx_http_status_handler(ngx_http_request_t *r) } } - size = sizeof("Active connections: \n") + NGX_INT32_LEN + size = sizeof("Active connections: \n") + NGX_ATOMIC_T_LEN + sizeof("server accepts handled requests\n") - 1 - + 6 + 3 * NGX_INT32_LEN - + sizeof("Reading: Writing: Waiting: \n") + 3 * NGX_INT32_LEN; + + 6 + 3 * NGX_ATOMIC_T_LEN + + sizeof("Reading: Writing: Waiting: \n") + 3 * NGX_ATOMIC_T_LEN; if (!(b = ngx_create_temp_buf(r->pool, size))) { return NGX_HTTP_INTERNAL_SERVER_ERROR; @@ -96,20 +96,20 @@ static ngx_int_t ngx_http_status_handler(ngx_http_request_t *r) out.next = NULL; ap = *ngx_stat_accepted; - hn = *ngx_connection_counter; + hn = *ngx_stat_handled; ac = *ngx_stat_active; rq = *ngx_stat_requests; rd = *ngx_stat_reading; wr = *ngx_stat_writing; - b->last = ngx_sprintf(b->last, "Active connections: %D \n", ac); + b->last = ngx_sprintf(b->last, "Active connections: %A \n", ac); b->last = ngx_cpymem(b->last, "server accepts handled requests\n", sizeof("server accepts handled requests\n") - 1); - b->last = ngx_sprintf(b->last, " %D %D %D \n", ap, hn, rq); + b->last = ngx_sprintf(b->last, " %A %A %A \n", ap, hn, rq); - b->last = ngx_sprintf(b->last, "Reading: %D Writing: %D Waiting: %d \n", + b->last = ngx_sprintf(b->last, "Reading: %A Writing: %A Waiting: %A \n", rd, wr, ac - (rd + wr)); r->headers_out.status = NGX_HTTP_OK; diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index f4908476c..b7e53ff2a 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -148,7 +148,7 @@ void ngx_http_init_connection(ngx_connection_t *c) ngx_mutex_unlock(ngx_posted_events_mutex); #if (NGX_STAT_STUB) - ngx_atomic_inc(ngx_stat_reading); + ngx_atomic_inc(ngx_stat_reading); #endif return; } |