Geo: ensure that default entry is always present.
If 0.0.0.0/32 entry was present and there was no explicit "default",
we failed to add an empty string as a default value.
Ruslan Ermilov
9 years ago
452 | 452 | ngx_destroy_pool(ctx.temp_pool); |
453 | 453 | ngx_destroy_pool(pool); |
454 | 454 | |
455 | if (ngx_radix32tree_find(ctx.tree, 0) != NGX_RADIX_NO_VALUE) { | |
456 | return rv; | |
457 | } | |
458 | ||
459 | 455 | if (ngx_radix32tree_insert(ctx.tree, 0, 0, |
460 | 456 | (uintptr_t) &ngx_http_variable_null_value) |
461 | 457 | == NGX_ERROR) |
462 | 458 | { |
463 | 459 | return NGX_CONF_ERROR; |
464 | 460 | } |
461 | ||
462 | /* NGX_BUSY is okay (default was set explicitly) */ | |
465 | 463 | } |
466 | 464 | |
467 | 465 | return rv; |