diff src/core/ngx_cycle.c @ 6776:1bf4f21b1b72

Core: show file contents only once while dumping configuration. Files are considered the same if the path used by nginx during parsing matches.
author Vladimir Homutov <vl@nginx.com>
date Tue, 18 Oct 2016 16:33:38 +0300
parents 3a50ccd94333
children 30b6f1ff192b
line wrap: on
line diff
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -132,6 +132,9 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
         return NULL;
     }
 
+    ngx_rbtree_init(&cycle->config_dump_rbtree, &cycle->config_dump_sentinel,
+                    ngx_str_rbtree_insert_value);
+
     if (old_cycle->open_files.part.nelts) {
         n = old_cycle->open_files.part.nelts;
         for (part = old_cycle->open_files.part.next; part; part = part->next) {