Skip to content

Move id_log() to msc_util to fix unit tests; it is declared on msc_ut… #3265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions apache2/apache2_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 -- */

/**
Expand Down
10 changes: 10 additions & 0 deletions apache2/msc_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Loading