diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-03-23 06:01:52 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-03-23 06:01:52 +0000 |
| commit | 89690bfe02703853c3e987d1e5c4d9878c4d28f0 (patch) | |
| tree | c5d9a59cdd74b54ffa939dcf59886307f26c984c /src/core | |
| parent | ae02c19867083c6ad3e51506109cb37bca1d36d1 (diff) | |
| download | nginx-89690bfe02703853c3e987d1e5c4d9878c4d28f0.tar.gz nginx-89690bfe02703853c3e987d1e5c4d9878c4d28f0.tar.bz2 | |
nginx-0.0.3-2004-03-23-09:01:52 import
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/ngx_hunk.h | 2 | ||||
| -rw-r--r-- | src/core/ngx_output_chain.c | 6 | ||||
| -rw-r--r-- | src/core/ngx_regex.c | 10 |
3 files changed, 13 insertions, 5 deletions
diff --git a/src/core/ngx_hunk.h b/src/core/ngx_hunk.h index ab32e45fb..afeca1e93 100644 --- a/src/core/ngx_hunk.h +++ b/src/core/ngx_hunk.h @@ -92,7 +92,7 @@ typedef struct { ngx_hunk_tag_t tag; ngx_output_chain_filter_pt output_filter; - void *output_ctx; + void *filter_ctx; } ngx_output_chain_ctx_t; diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index 55c4a50a3..285bd8340 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -28,13 +28,13 @@ int ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) if (ctx->in == NULL) { if (in == NULL) { - return ctx->output_filter(ctx->output_ctx, in); + return ctx->output_filter(ctx->filter_ctx, in); } if (in->next == NULL && (!ngx_output_chain_need_to_copy(ctx, in->hunk))) { - return ctx->output_filter(ctx->output_ctx, in); + return ctx->output_filter(ctx->filter_ctx, in); } } @@ -153,7 +153,7 @@ int ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) return last; } - last = ctx->output_filter(ctx->output_ctx, out); + last = ctx->output_filter(ctx->filter_ctx, out); ngx_chain_update_chains(&ctx->free, &ctx->busy, &out, ctx->tag); last_out = &out; diff --git a/src/core/ngx_regex.c b/src/core/ngx_regex.c index 1627f9fa6..617fddcbb 100644 --- a/src/core/ngx_regex.c +++ b/src/core/ngx_regex.c @@ -42,6 +42,10 @@ ngx_regex_t *ngx_regex_compile(ngx_str_t *pattern, ngx_int_t options, } } + /* ensure that there is no current pool */ + + ngx_pcre_pool = NULL; + return re; } @@ -64,7 +68,11 @@ ngx_int_t ngx_regex_exec(ngx_regex_t *re, ngx_str_t *s, static void *ngx_regex_malloc(size_t size) { - return ngx_palloc(ngx_pcre_pool, size); + if (ngx_pcre_pool) { + return ngx_palloc(ngx_pcre_pool, size); + } + + return NULL; } |
