Mercurial > hg > nginx-quic
comparison src/core/ngx_cycle.c @ 6187:1b7e246e6b38
Core: store and dump processed configuration.
If the -T option is passed, additionally to configuration test, configuration
files are output to stdout.
In the debug mode, configuration files are kept in memory and can be accessed
using a debugger.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Thu, 14 May 2015 18:54:27 +0300 |
parents | 4f6efabcb09b |
children | 0f203a2af17c |
comparison
equal
deleted
inserted
replaced
6186:db138b3b645e | 6187:1b7e246e6b38 |
---|---|
22 | 22 |
23 static ngx_pool_t *ngx_temp_pool; | 23 static ngx_pool_t *ngx_temp_pool; |
24 static ngx_event_t ngx_cleaner_event; | 24 static ngx_event_t ngx_cleaner_event; |
25 | 25 |
26 ngx_uint_t ngx_test_config; | 26 ngx_uint_t ngx_test_config; |
27 ngx_uint_t ngx_dump_config; | |
27 ngx_uint_t ngx_quiet_mode; | 28 ngx_uint_t ngx_quiet_mode; |
28 | 29 |
29 | 30 |
30 /* STUB NAME */ | 31 /* STUB NAME */ |
31 static ngx_connection_t dumb; | 32 static ngx_connection_t dumb; |
122 cycle->paths.size = sizeof(ngx_path_t *); | 123 cycle->paths.size = sizeof(ngx_path_t *); |
123 cycle->paths.nalloc = n; | 124 cycle->paths.nalloc = n; |
124 cycle->paths.pool = pool; | 125 cycle->paths.pool = pool; |
125 | 126 |
126 | 127 |
128 if (ngx_array_init(&cycle->config_dump, pool, 1, sizeof(ngx_conf_dump_t)) | |
129 != NGX_OK) | |
130 { | |
131 ngx_destroy_pool(pool); | |
132 return NULL; | |
133 } | |
134 | |
127 if (old_cycle->open_files.part.nelts) { | 135 if (old_cycle->open_files.part.nelts) { |
128 n = old_cycle->open_files.part.nelts; | 136 n = old_cycle->open_files.part.nelts; |
129 for (part = old_cycle->open_files.part.next; part; part = part->next) { | 137 for (part = old_cycle->open_files.part.next; part; part = part->next) { |
130 n += part->nelts; | 138 n += part->nelts; |
131 } | 139 } |