From ed8024f452dc9ac5fef104c4f74275b11d745d89 Mon Sep 17 00:00:00 2001 From: "Allan K. Edwards" Date: Wed, 6 Mar 2002 17:29:39 +0000 Subject: [PATCH] make sure r->proto_xxput_filter gets updated as necessary when deleting a filter from the chain git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93732 13f79535-47bb-0310-9956-ffa450edef68 --- server/util_filter.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/util_filter.c b/server/util_filter.c index 6f82c18674..c818de9051 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -461,12 +461,15 @@ AP_DECLARE(ap_filter_t *) ap_add_output_filter_handle(ap_filter_rec_t *f, &c->output_filters); } -static void remove_any_filter(ap_filter_t *f, ap_filter_t **r_filt, +static void remove_any_filter(ap_filter_t *f, ap_filter_t **r_filt, ap_filter_t **p_filt, ap_filter_t **c_filt) { ap_filter_t **curr = r_filt ? r_filt : c_filt; ap_filter_t *fscan = *curr; + if (*p_filt == f) + *p_filt = (*p_filt)->next; + if (*curr == f) { *curr = (*curr)->next; (*curr)->prev = NULL; @@ -486,12 +489,14 @@ static void remove_any_filter(ap_filter_t *f, ap_filter_t **r_filt, AP_DECLARE(void) ap_remove_input_filter(ap_filter_t *f) { remove_any_filter(f, f->r ? &f->r->input_filters : NULL, + f->r ? &f->r->proto_input_filters : NULL, &f->c->input_filters); } AP_DECLARE(void) ap_remove_output_filter(ap_filter_t *f) { remove_any_filter(f, f->r ? &f->r->output_filters : NULL, + f->r ? &f->r->proto_output_filters : NULL, &f->c->output_filters); } -- 2.40.0