From 149376377ecef9ecc36ee81d5b666fc0ac7e249b Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Tue, 1 Oct 2024 13:58:22 +0200 Subject: [PATCH] Move id_log() to msc_util to fix unit tests; it is declared on msc_util.h already --- apache2/apache2_config.c | 10 ---------- apache2/msc_util.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apache2/apache2_config.c b/apache2/apache2_config.c index ca2189399a..da10b4bfe6 100644 --- a/apache2/apache2_config.c +++ b/apache2/apache2_config.c @@ -30,16 +30,6 @@ APLOG_USE_MODULE(security2); #endif -// Returns the rule id if existing, otherwise the file name & line number -const char* id_log(msre_rule* rule) { - assert(rule != NULL); - assert(rule->actionset != NULL); - assert(rule->ruleset != NULL); - const char* id = rule->actionset->id; - if (!id || id == NOT_SET_P || !*id) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num); - return id; -} - /* -- Directory context creation and initialisation -- */ /** diff --git a/apache2/msc_util.c b/apache2/msc_util.c index bce5b24ffe..5b07392d44 100644 --- a/apache2/msc_util.c +++ b/apache2/msc_util.c @@ -2849,3 +2849,13 @@ char* get_username(apr_pool_t* mp) { if (rc != APR_SUCCESS) return "apache"; return username; } + +// Returns the rule id if existing, otherwise the file name & line number +const char* id_log(msre_rule* rule) { + assert(rule != NULL); + assert(rule->actionset != NULL); + assert(rule->ruleset != NULL); + const char* id = rule->actionset->id; + if (!id || id == NOT_SET_P || !*id) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num); + return id; +}