From 46d7a5ec6f23167f1851139ae0677e67cb560e9e Mon Sep 17 00:00:00 2001 From: brectanus Date: Mon, 11 Jun 2007 21:15:14 +0000 Subject: [PATCH] Move transformation cache rec def re.h from modsecurity.h --- apache2/modsecurity.h | 1 - apache2/re.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apache2/modsecurity.h b/apache2/modsecurity.h index 0a523168..fb106284 100644 --- a/apache2/modsecurity.h +++ b/apache2/modsecurity.h @@ -25,7 +25,6 @@ typedef struct msc_engine msc_engine; typedef struct msc_data_chunk msc_data_chunk; typedef struct msc_arg msc_arg; typedef struct msc_string msc_string; -typedef struct msc_cache_rec msc_cache_rec; #if !(defined(WIN32) || defined(NETWARE) || defined(SOLARIS2)) #define DSOLOCAL __attribute__((visibility("hidden"))) diff --git a/apache2/re.c b/apache2/re.c index 47286f0f..36700ff5 100644 --- a/apache2/re.c +++ b/apache2/re.c @@ -1532,9 +1532,9 @@ apr_status_t msre_rule_process(msre_rule *rule, modsec_rec *msr) { if (usecache) { /* ENH1: Add flag to vars to tell which ones can change across phases store the rest in a global cache */ if (carr == NULL) { - carr = (msre_cache_rec **)apr_pcalloc(msr->mp, (sizeof(msc_cache_rec *) * (PHASE_LAST + 1))); + carr = (msre_cache_rec **)apr_pcalloc(msr->mp, (sizeof(msre_cache_rec *) * (PHASE_LAST + 1))); if (carr == NULL) return -1; - memset(carr, 0, (sizeof(msc_cache_rec *) * (PHASE_LAST + 1))); + memset(carr, 0, (sizeof(msre_cache_rec *) * (PHASE_LAST + 1))); apr_hash_set(msr->tcache, tfnskey, APR_HASH_KEY_STRING, carr); } crec = carr[msr->phase] = (msre_cache_rec *)apr_pcalloc(msr->mp, sizeof(msre_cache_rec)); @@ -1588,13 +1588,13 @@ apr_status_t msre_rule_process(msre_rule *rule, modsec_rec *msr) { if (msr->txcfg->debuglog_level >= 9) { apr_hash_index_t *hi; void *dummy; - msc_cache_rec **rec; + msre_cache_rec **rec; int hn = 0; int ri; for (hi = apr_hash_first(msr->mp, msr->tcache); hi; hi = apr_hash_next(hi)) { hn++; apr_hash_this(hi, NULL, NULL, &dummy); - rec = (msc_cache_rec **)dummy; + rec = (msre_cache_rec **)dummy; if (rec == NULL) continue; for (ri = PHASE_FIRST; ri <= PHASE_LAST; ri++) {