comparison src/http/ngx_http_script.c @ 7833:3ab8e1e2f0f7

Upstream: variables support in certificates.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 06 May 2021 02:22:09 +0300
parents bdd4d89370a7
children d26db4f82d7d
comparison
equal deleted inserted replaced
7832:be82e72c9af8 7833:3ab8e1e2f0f7
274 return NGX_CONF_OK; 274 return NGX_CONF_OK;
275 } 275 }
276 276
277 277
278 char * 278 char *
279 ngx_http_set_complex_value_zero_slot(ngx_conf_t *cf, ngx_command_t *cmd,
280 void *conf)
281 {
282 char *p = conf;
283
284 ngx_str_t *value;
285 ngx_http_complex_value_t **cv;
286 ngx_http_compile_complex_value_t ccv;
287
288 cv = (ngx_http_complex_value_t **) (p + cmd->offset);
289
290 if (*cv != NGX_CONF_UNSET_PTR) {
291 return "is duplicate";
292 }
293
294 *cv = ngx_palloc(cf->pool, sizeof(ngx_http_complex_value_t));
295 if (*cv == NULL) {
296 return NGX_CONF_ERROR;
297 }
298
299 value = cf->args->elts;
300
301 ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
302
303 ccv.cf = cf;
304 ccv.value = &value[1];
305 ccv.complex_value = *cv;
306 ccv.zero = 1;
307
308 if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
309 return NGX_CONF_ERROR;
310 }
311
312 return NGX_CONF_OK;
313 }
314
315
316 char *
279 ngx_http_set_complex_value_size_slot(ngx_conf_t *cf, ngx_command_t *cmd, 317 ngx_http_set_complex_value_size_slot(ngx_conf_t *cf, ngx_command_t *cmd,
280 void *conf) 318 void *conf)
281 { 319 {
282 char *p = conf; 320 char *p = conf;
283 321