Klaus Demo nginx / 95ec258
fix online upgrade Igor Sysoev 15 years ago
1 changed file(s) with 5 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
422422
423423 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
424424
425 if (last) {
426 n = *last;
427
428 } else {
429 if (ccf->environment) {
430 return ccf->environment;
431 }
432
433 n = 0;
425 if (last == NULL && ccf->environment) {
426 return ccf->environment;
434427 }
435428
436429 var = ccf->env.elts;
451444 var = ccf->env.elts;
452445
453446 tz_found:
447
448 n = 0;
454449
455450 for (i = 0; i < ccf->env.nelts; i++) {
456451
471466 }
472467
473468 if (last) {
469 env = ngx_alloc((*last + n + 1) * sizeof(char *), cycle->log);
474470 *last = n;
475 env = ngx_alloc((n + 1) * sizeof(char *), cycle->log);
476471
477472 } else {
478473 env = ngx_palloc(cycle->pool, (n + 1) * sizeof(char *));