Mercurial > hg > nginx
comparison src/stream/ngx_stream_geo_module.c @ 7214:88aad69eccef
Geo: optimized configuration parser.
If the geo block parser has failed, doing more things is pointless.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 21 Feb 2018 15:50:43 +0300 |
parents | c69c13f10502 |
children | 2dc837d16099 |
comparison
equal
deleted
inserted
replaced
7213:c69c13f10502 | 7214:88aad69eccef |
---|---|
429 | 429 |
430 rv = ngx_conf_parse(cf, NULL); | 430 rv = ngx_conf_parse(cf, NULL); |
431 | 431 |
432 *cf = save; | 432 *cf = save; |
433 | 433 |
434 if (rv != NGX_CONF_OK) { | |
435 goto failed; | |
436 } | |
437 | |
434 if (ctx.ranges) { | 438 if (ctx.ranges) { |
435 | 439 |
436 if (ctx.high.low && !ctx.binary_include) { | 440 if (ctx.high.low && !ctx.binary_include) { |
437 for (i = 0; i < 0x10000; i++) { | 441 for (i = 0; i < 0x10000; i++) { |
438 a = (ngx_array_t *) ctx.high.low[i]; | 442 a = (ngx_array_t *) ctx.high.low[i]; |
520 } | 524 } |
521 | 525 |
522 ngx_destroy_pool(ctx.temp_pool); | 526 ngx_destroy_pool(ctx.temp_pool); |
523 ngx_destroy_pool(pool); | 527 ngx_destroy_pool(pool); |
524 | 528 |
525 return rv; | 529 return NGX_CONF_OK; |
526 | 530 |
527 failed: | 531 failed: |
528 | 532 |
529 ngx_destroy_pool(ctx.temp_pool); | 533 ngx_destroy_pool(ctx.temp_pool); |
530 ngx_destroy_pool(pool); | 534 ngx_destroy_pool(pool); |