mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Code cosmetic: Having the code following our coding style
This commit also update some methods parameters to const.
This commit is contained in:
@@ -85,8 +85,8 @@ class Assay {
|
||||
~Assay();
|
||||
|
||||
/** TODO: Should be an structure that fits an IP address */
|
||||
int processConnection(char *ip);
|
||||
int processURI(char *uri);
|
||||
int processConnection(const char *ip);
|
||||
int processURI(const char *uri);
|
||||
|
||||
|
||||
int processRequestHeaders();
|
||||
@@ -130,8 +130,8 @@ class Assay {
|
||||
private:
|
||||
std::ofstream myfile;
|
||||
Rules *m_rules;
|
||||
char *m_ipAddress;
|
||||
char *m_uri;
|
||||
const char *m_ipAddress;
|
||||
const char *m_uri;
|
||||
std::ostringstream m_requestBody;
|
||||
std::ostringstream m_responseBody;
|
||||
ModSecurityCollectionsVariables m_variables_collections;
|
||||
@@ -148,7 +148,7 @@ extern "C" {
|
||||
Assay *msc_new_assay(ModSecurity *ms, Rules *rules);
|
||||
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
int msc_process_connection(Assay *assay, char *ip);
|
||||
int msc_process_connection(Assay *assay, const char *ip);
|
||||
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
int msc_process_request_headers(Assay *assay);
|
||||
@@ -184,7 +184,7 @@ int msc_append_response_body(Assay *assay,
|
||||
const unsigned char *body, size_t size);
|
||||
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
int msc_process_uri(Assay *assay, char *uri);
|
||||
int msc_process_uri(Assay *assay, const char *uri);
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
const char *msc_get_response_body(Assay *assay);
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
|
@@ -23,8 +23,8 @@ namespace ModSecurity {
|
||||
typedef struct ModSecurityIntervention_t {
|
||||
int status;
|
||||
int pause;
|
||||
char *url;
|
||||
char *log;
|
||||
const char *url;
|
||||
const char *log;
|
||||
} ModSecurityIntervention;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -64,7 +64,7 @@ class Rules {
|
||||
*/
|
||||
int loadFromUri(char *uri);
|
||||
int loadRemote(char *key, char *uri);
|
||||
int load(char *rules);
|
||||
int load(const char *rules);
|
||||
|
||||
int merge(Driver *driver);
|
||||
int merge(Rules *rules);
|
||||
@@ -100,7 +100,7 @@ Rules *msc_create_rules_set();
|
||||
int msc_rules_merge(Rules *rules_dst, Rules *rules_from);
|
||||
int msc_rules_add_remote(Rules *rules, char *key, char *uri);
|
||||
int msc_rules_add_file(Rules *rules, char *file);
|
||||
int msc_rules_add(Rules *rules, char *plain_rules);
|
||||
int msc_rules_add(Rules *rules, const char *plain_rules);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user