Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2017-01-20 14:03:19 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2017-01-20 14:03:19 +0300
commit660e1a5340f15bdfcedfd298ccf96ca8a9604af2 (patch)
tree186aed7457aa549554f3909a2426162ee6a60ae2 /src/core/ngx_connection.c
parent620c9a4c44087069c0a50be96748b98be7d497a8 (diff)
Added cycle parameter to ngx_drain_connections().
No functional changes, mostly style.
Diffstat (limited to 'src/core/ngx_connection.c')
-rw-r--r--src/core/ngx_connection.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index a789d8c51..c43163f18 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -13,7 +13,7 @@
ngx_os_io_t ngx_io;
-static void ngx_drain_connections(void);
+static void ngx_drain_connections(ngx_cycle_t *cycle);
ngx_listening_t *
@@ -1046,7 +1046,7 @@ ngx_get_connection(ngx_socket_t s, ngx_log_t *log)
c = ngx_cycle->free_connections;
if (c == NULL) {
- ngx_drain_connections();
+ ngx_drain_connections((ngx_cycle_t *) ngx_cycle);
c = ngx_cycle->free_connections;
}
@@ -1226,18 +1226,18 @@ ngx_reusable_connection(ngx_connection_t *c, ngx_uint_t reusable)
static void
-ngx_drain_connections(void)
+ngx_drain_connections(ngx_cycle_t *cycle)
{
ngx_int_t i;
ngx_queue_t *q;
ngx_connection_t *c;
for (i = 0; i < 32; i++) {
- if (ngx_queue_empty(&ngx_cycle->reusable_connections_queue)) {
+ if (ngx_queue_empty(&cycle->reusable_connections_queue)) {
break;
}
- q = ngx_queue_last(&ngx_cycle->reusable_connections_queue);
+ q = ngx_queue_last(&cycle->reusable_connections_queue);
c = ngx_queue_data(q, ngx_connection_t, queue);
ngx_log_debug0(NGX_LOG_DEBUG_CORE, c->log, 0,