diff src/stream/ngx_stream.c @ 6174:68c106e6fa0a

Stream: added postconfiguration method to stream modules.
author Vladimir Homutov <vl@nginx.com>
date Tue, 09 Jun 2015 13:00:45 +0300
parents 3e8cddcff381
children 78c06e5e1d76
line wrap: on
line diff
--- a/src/stream/ngx_stream.c
+++ b/src/stream/ngx_stream.c
@@ -204,6 +204,20 @@ ngx_stream_block(ngx_conf_t *cf, ngx_com
         }
     }
 
+    for (m = 0; ngx_modules[m]; m++) {
+        if (ngx_modules[m]->type != NGX_STREAM_MODULE) {
+            continue;
+        }
+
+        module = ngx_modules[m]->ctx;
+
+        if (module->postconfiguration) {
+            if (module->postconfiguration(cf) != NGX_OK) {
+                return NGX_CONF_ERROR;
+            }
+        }
+    }
+
     *cf = pcf;