Adds method setConnectorInformation to ModSecurity class

For the purpose of log it is necessary for modsecurity to understand which
'connector' is consuming the API.
This commit is contained in:
Felipe Zimmerle
2015-07-09 15:13:43 -03:00
parent e42e7545d7
commit 2138dd1369
5 changed files with 77 additions and 1 deletions

View File

@@ -124,6 +124,8 @@ class ModSecurity {
~ModSecurity() { }
static std::string whoAmI();
void setConnectorInformation(std::string connector);
const std::string& getConnectorInformation();
/**
*
@@ -200,6 +202,9 @@ class ModSecurity {
*/
NUMBER_OF_PHASES,
};
private:
std::string m_connector;
};
@@ -213,6 +218,8 @@ extern "C" {
ModSecurity *msc_init();
/** @ingroup ModSecurity_C_API */
const char *msc_who_am_i(ModSecurity *msc);
/** @ingroup ModSecurity_C_API */
void msc_set_connector_info(ModSecurity *msc, const char *connector);
#ifdef __cplusplus
}