comparison src/http/modules/ngx_http_grpc_module.c @ 7831:bdd4d89370a7

Changed complex value slots to use NGX_CONF_UNSET_PTR. With this change, it is now possible to use ngx_conf_merge_ptr_value() to merge complex values. This change 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), and the change in ngx_conf_set_keyval_slot() (7728:485dba3e2a01, 1.19.4). To preserve compatibility with existing 3rd party modules, both NULL and NGX_CONF_UNSET_PTR are accepted for now.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 06 May 2021 02:22:03 +0300
parents 6df9d7df2784
children 3ab8e1e2f0f7
comparison
equal deleted inserted replaced
7830:f2ff291bbdac 7831:bdd4d89370a7
4329 * set by ngx_pcalloc(): 4329 * set by ngx_pcalloc():
4330 * 4330 *
4331 * conf->upstream.ignore_headers = 0; 4331 * conf->upstream.ignore_headers = 0;
4332 * conf->upstream.next_upstream = 0; 4332 * conf->upstream.next_upstream = 0;
4333 * conf->upstream.hide_headers_hash = { NULL, 0 }; 4333 * conf->upstream.hide_headers_hash = { NULL, 0 };
4334 * conf->upstream.ssl_name = NULL;
4335 * 4334 *
4336 * conf->headers.lengths = NULL; 4335 * conf->headers.lengths = NULL;
4337 * conf->headers.values = NULL; 4336 * conf->headers.values = NULL;
4338 * conf->headers.hash = { NULL, 0 }; 4337 * conf->headers.hash = { NULL, 0 };
4339 * conf->host = { 0, NULL }; 4338 * conf->host = { 0, NULL };
4362 4361
4363 conf->upstream.intercept_errors = NGX_CONF_UNSET; 4362 conf->upstream.intercept_errors = NGX_CONF_UNSET;
4364 4363
4365 #if (NGX_HTTP_SSL) 4364 #if (NGX_HTTP_SSL)
4366 conf->upstream.ssl_session_reuse = NGX_CONF_UNSET; 4365 conf->upstream.ssl_session_reuse = NGX_CONF_UNSET;
4366 conf->upstream.ssl_name = NGX_CONF_UNSET_PTR;
4367 conf->upstream.ssl_server_name = NGX_CONF_UNSET; 4367 conf->upstream.ssl_server_name = NGX_CONF_UNSET;
4368 conf->upstream.ssl_verify = NGX_CONF_UNSET; 4368 conf->upstream.ssl_verify = NGX_CONF_UNSET;
4369 conf->ssl_verify_depth = NGX_CONF_UNSET_UINT; 4369 conf->ssl_verify_depth = NGX_CONF_UNSET_UINT;
4370 conf->ssl_passwords = NGX_CONF_UNSET_PTR; 4370 conf->ssl_passwords = NGX_CONF_UNSET_PTR;
4371 conf->ssl_conf_commands = NGX_CONF_UNSET_PTR; 4371 conf->ssl_conf_commands = NGX_CONF_UNSET_PTR;
4457 |NGX_SSL_TLSv1_1|NGX_SSL_TLSv1_2)); 4457 |NGX_SSL_TLSv1_1|NGX_SSL_TLSv1_2));
4458 4458
4459 ngx_conf_merge_str_value(conf->ssl_ciphers, prev->ssl_ciphers, 4459 ngx_conf_merge_str_value(conf->ssl_ciphers, prev->ssl_ciphers,
4460 "DEFAULT"); 4460 "DEFAULT");
4461 4461
4462 if (conf->upstream.ssl_name == NULL) { 4462 ngx_conf_merge_ptr_value(conf->upstream.ssl_name,
4463 conf->upstream.ssl_name = prev->upstream.ssl_name; 4463 prev->upstream.ssl_name, NULL);
4464 }
4465
4466 ngx_conf_merge_value(conf->upstream.ssl_server_name, 4464 ngx_conf_merge_value(conf->upstream.ssl_server_name,
4467 prev->upstream.ssl_server_name, 0); 4465 prev->upstream.ssl_server_name, 0);
4468 ngx_conf_merge_value(conf->upstream.ssl_verify, 4466 ngx_conf_merge_value(conf->upstream.ssl_verify,
4469 prev->upstream.ssl_verify, 0); 4467 prev->upstream.ssl_verify, 0);
4470 ngx_conf_merge_uint_value(conf->ssl_verify_depth, 4468 ngx_conf_merge_uint_value(conf->ssl_verify_depth,