Mercurial > hg > nginx
comparison src/stream/ngx_stream.c @ 6606:2f41d383c9c7
Stream: added preconfiguration step.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 15 Jun 2016 15:10:24 +0300 |
parents | b3b7e33083ac |
children | c70b7f4537e1 |
comparison
equal
deleted
inserted
replaced
6605:f379b32e4733 | 6606:2f41d383c9c7 |
---|---|
141 } | 141 } |
142 } | 142 } |
143 } | 143 } |
144 | 144 |
145 | 145 |
146 /* parse inside the stream{} block */ | |
147 | |
148 pcf = *cf; | 146 pcf = *cf; |
149 cf->ctx = ctx; | 147 cf->ctx = ctx; |
148 | |
149 for (m = 0; cf->cycle->modules[m]; m++) { | |
150 if (cf->cycle->modules[m]->type != NGX_STREAM_MODULE) { | |
151 continue; | |
152 } | |
153 | |
154 module = cf->cycle->modules[m]->ctx; | |
155 | |
156 if (module->preconfiguration) { | |
157 if (module->preconfiguration(cf) != NGX_OK) { | |
158 return NGX_CONF_ERROR; | |
159 } | |
160 } | |
161 } | |
162 | |
163 | |
164 /* parse inside the stream{} block */ | |
150 | 165 |
151 cf->module_type = NGX_STREAM_MODULE; | 166 cf->module_type = NGX_STREAM_MODULE; |
152 cf->cmd_type = NGX_STREAM_MAIN_CONF; | 167 cf->cmd_type = NGX_STREAM_MAIN_CONF; |
153 rv = ngx_conf_parse(cf, NULL); | 168 rv = ngx_conf_parse(cf, NULL); |
154 | 169 |