mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Merge pull request #3227 from eduar-hte/pm-operator-multithreading
Removed unnecessary lock to call acmp_process_quick in Pm::evaluate
This commit is contained in:
@@ -321,7 +321,6 @@ libmodsecurity_la_CPPFLAGS = \
|
||||
$(GEOIP_CFLAGS) \
|
||||
$(GLOBAL_CPPFLAGS) \
|
||||
$(MODSEC_NO_LOGS) \
|
||||
$(MODSEC_MUTEX_ON_PM) \
|
||||
$(YAJL_CFLAGS) \
|
||||
$(LMDB_CFLAGS) \
|
||||
$(PCRE_CFLAGS) \
|
||||
|
@@ -85,14 +85,7 @@ bool Pm::evaluate(Transaction *transaction, RuleWithActions *rule,
|
||||
pt.parser = m_p;
|
||||
pt.ptr = NULL;
|
||||
const char *match = NULL;
|
||||
#ifdef MODSEC_MUTEX_ON_PM
|
||||
{
|
||||
const std::lock_guard lock(m_mutex);
|
||||
#endif
|
||||
rc = acmp_process_quick(&pt, &match, input.c_str(), input.length());
|
||||
#ifdef MODSEC_MUTEX_ON_PM
|
||||
}
|
||||
#endif
|
||||
|
||||
if (rc >= 0 && transaction) {
|
||||
std::string match_(match?match:"");
|
||||
|
@@ -53,12 +53,6 @@ class Pm : public Operator {
|
||||
|
||||
protected:
|
||||
ACMP *m_p;
|
||||
|
||||
#ifdef MODSEC_MUTEX_ON_PM
|
||||
|
||||
private:
|
||||
std::mutex m_mutex;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user