diff src/os/win32/ngx_process_cycle.c @ 6379:cf5e822cf470

Dynamic modules: changed ngx_modules to cycle->modules.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 04 Feb 2016 18:30:21 +0300
parents 5e6142609e48
children 2b7dacb381ed
line wrap: on
line diff
--- a/src/os/win32/ngx_process_cycle.c
+++ b/src/os/win32/ngx_process_cycle.c
@@ -553,9 +553,9 @@ ngx_master_process_exit(ngx_cycle_t *cyc
 
     ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exit");
 
-    for (i = 0; ngx_modules[i]; i++) {
-        if (ngx_modules[i]->exit_master) {
-            ngx_modules[i]->exit_master(cycle);
+    for (i = 0; cycle->modules[i]; i++) {
+        if (cycle->modules[i]->exit_master) {
+            cycle->modules[i]->exit_master(cycle);
         }
     }
 
@@ -766,9 +766,9 @@ ngx_worker_thread(void *data)
 
     cycle = (ngx_cycle_t *) ngx_cycle;
 
-    for (n = 0; ngx_modules[n]; n++) {
-        if (ngx_modules[n]->init_process) {
-            if (ngx_modules[n]->init_process(cycle) == NGX_ERROR) {
+    for (n = 0; cycle->modules[n]; n++) {
+        if (cycle->modules[n]->init_process) {
+            if (cycle->modules[n]->init_process(cycle) == NGX_ERROR) {
                 /* fatal */
                 exit(2);
             }
@@ -825,9 +825,9 @@ ngx_worker_process_exit(ngx_cycle_t *cyc
 
     ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exit");
 
-    for (i = 0; ngx_modules[i]; i++) {
-        if (ngx_modules[i]->exit_process) {
-            ngx_modules[i]->exit_process(cycle);
+    for (i = 0; cycle->modules[i]; i++) {
+        if (cycle->modules[i]->exit_process) {
+            cycle->modules[i]->exit_process(cycle);
         }
     }