aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_conf_file.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2020-10-22 18:00:20 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2020-10-22 18:00:20 +0300
commitaf05f05f91ef0295d875871d4ab3c1a1226ad108 (patch)
tree4eddc3c068884476d474fb29f3a76ec560ec1e1e /src/core/ngx_conf_file.c
parent2ba670a9257da1872b2dd7a866651b637a29997d (diff)
downloadnginx-af05f05f91ef0295d875871d4ab3c1a1226ad108.tar.gz
nginx-af05f05f91ef0295d875871d4ab3c1a1226ad108.zip
Core: ngx_conf_set_keyval_slot() now accepts NGX_CONF_UNSET_PTR.
With this change, it is now possible to use ngx_conf_merge_ptr_value() to merge keyval arrays. This change actually follows much earlier changes in ngx_conf_merge_ptr_value() and ngx_conf_set_str_array_slot() in 1452:cd586e963db0 (0.6.10) and 1701:40d004d95d88 (0.6.22). To preserve compatibility with existing 3rd party modules, both NULL and NGX_CONF_UNSET_PTR are accepted for now.
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r--src/core/ngx_conf_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index 6d1629e9b..fec7bb83a 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -1137,7 +1137,7 @@ ngx_conf_set_keyval_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
a = (ngx_array_t **) (p + cmd->offset);
- if (*a == NULL) {
+ if (*a == NGX_CONF_UNSET_PTR || *a == NULL) {
*a = ngx_array_create(cf->pool, 4, sizeof(ngx_keyval_t));
if (*a == NULL) {
return NGX_CONF_ERROR;