mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
defined id_log() only once
This commit is contained in:
@@ -31,10 +31,9 @@
|
||||
#endif
|
||||
|
||||
// Returns the rule id if existing, otherwise the file name & line number
|
||||
static const char* id_log(msre_rule* rule) {
|
||||
const char* id_log(msre_rule* rule) {
|
||||
char* id = rule->actionset->id;
|
||||
if (id == NOT_SET_P || !id || !*id)
|
||||
id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
|
||||
if (!id || !*id || id == NOT_SET_P) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@@ -166,6 +166,7 @@ int ip_tree_from_uri(TreeRoot **rtree, char *uri,
|
||||
#endif
|
||||
|
||||
char DSOLOCAL *get_username(apr_pool_t* mp);
|
||||
const char* id_log(msre_rule* rule);
|
||||
|
||||
int read_line(char *buff, int size, FILE *fp);
|
||||
|
||||
|
@@ -48,13 +48,6 @@ static apr_status_t msre_rule_process(msre_rule *rule, modsec_rec *msr);
|
||||
|
||||
/* -- Actions, variables, functions and operator functions ----------------- */
|
||||
|
||||
// Returns the rule id if existing, otherwise the file name & line number
|
||||
static const char* id_log(msre_rule* rule) {
|
||||
const char* id = rule->actionset->id;
|
||||
if (!id || !*id || id == NOT_SET_P) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Remove rule targets to be processed
|
||||
*
|
||||
|
Reference in New Issue
Block a user