Klaus Demo nginx / eb03ea7
refactor obscure code Igor Sysoev 13 years ago
1 changed file(s) with 14 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
144144 }
145145
146146 if (rc == NGX_CONF_BLOCK_DONE) {
147
147148 if (!block) {
148149 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"}\"");
149150 goto failed;
150151 }
151152
152 block = 0;
153 }
154
155 if (rc == NGX_CONF_FILE_DONE && block) {
156 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
157 "unexpected end of file, expecting \"}\"");
158 goto failed;
159 }
160
161 if (rc != NGX_OK && rc != NGX_CONF_BLOCK_START) {
162153 goto done;
163154 }
155
156 if (rc == NGX_CONF_FILE_DONE) {
157
158 if (block) {
159 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
160 "unexpected end of file, expecting \"}\"");
161 goto failed;
162 }
163
164 goto done;
165 }
166
167 /* rc == NGX_OK || rc == NGX_CONF_BLOCK_START */
164168
165169 if (cf->handler) {
166170