Makes m_id a shared pointer

This commit is contained in:
Felipe Zimmerle
2019-01-23 10:29:36 -03:00
parent 343b86c2a7
commit a609249d64
6 changed files with 49 additions and 54 deletions

View File

@@ -88,13 +88,13 @@ class RuleMessage {
return log(rm, 0);
}
static std::string _details(const RuleMessage *rm);
static std::string _errorLogTail(const RuleMessage *rm);
static inline void _details(const RuleMessage *rm, std::string *msg);
static inline void _errorLogTail(const RuleMessage *rm, std::string *msg);
int m_accuracy;
std::shared_ptr<std::string> m_clientIpAddress;
std::string m_data;
std::string m_id;
std::shared_ptr<std::string> m_id;
bool m_isDisruptive;
std::string m_match;
int m_maturity;

View File

@@ -52,7 +52,7 @@ typedef struct Rules_t RulesSet;
#define ms_dbg(b, c) \
do { \
if (m_rules && m_rules->m_debugLog && m_rules->m_debugLog->m_debugLevel >= b) { \
m_rules->debug(b, m_id, m_uri, c); \
m_rules->debug(b, *m_id.get(), m_uri, c); \
} \
} while (0);
#else
@@ -516,7 +516,7 @@ class Transaction : public TransactionAnchoredVariables {
* Contains the unique ID of the transaction. Use by the variable
* `UNIQUE_ID'. This unique id is also saved as part of the AuditLog.
*/
std::string m_id;
std::shared_ptr<std::string> m_id;
/**
* Holds the SecMarker name that this transaction should wait to perform