From d55e023bf7ff481b13074d1baf231c250422af27 Mon Sep 17 00:00:00 2001 From: brectanus Date: Thu, 14 Jun 2007 16:13:53 +0000 Subject: [PATCH] Revert msr_log as macro (still work-in-progress) --- apache2/apache2.h | 9 +-------- apache2/apache2_util.c | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/apache2/apache2.h b/apache2/apache2.h index ddd14320..1f3e9571 100644 --- a/apache2/apache2.h +++ b/apache2/apache2.h @@ -63,14 +63,7 @@ char DSOLOCAL *get_env_var(request_rec *r, char *name); void DSOLOCAL internal_log(request_rec *r, directory_config *dcfg, modsec_rec *msr, int level, const char *text, va_list ap); - -/* msr_log is now a macro to avoid function call overhead. Nothing - * is done to avoid expansion of arguments, so do not call with - * arguments that cannot be duplicated (ie no level++, etc.) - */ -void DSOLOCAL _msr_log(modsec_rec *msr, int level, const char *text, ...); -#define msr_log(msr, lvl, ...) \ - do { if ((msr->txcfg != NULL) && (lvl <= msr->txcfg->debuglog_level)) _msr_log(msr, lvl, __VA_ARGS__); } while(0) +void DSOLOCAL msr_log(modsec_rec *msr, int level, const char *text, ...); char DSOLOCAL *format_error_log_message(apr_pool_t *mp, error_message *em); diff --git a/apache2/apache2_util.c b/apache2/apache2_util.c index afa994b4..f60d1ce8 100644 --- a/apache2/apache2_util.c +++ b/apache2/apache2_util.c @@ -245,7 +245,7 @@ void internal_log(request_rec *r, directory_config *dcfg, modsec_rec *msr, * Logs one message at the given level to the debug log (and to the * Apache error log if the message is important enough. */ -void _msr_log(modsec_rec *msr, int level, const char *text, ...) { +void msr_log(modsec_rec *msr, int level, const char *text, ...) { va_list ap; va_start(ap, text);