Eduardo Arias
df081af870
Adjusted pthread LDFLAG in examples required for multithreading.
...
- Some versions of gcc/libc require setting the pthread flag when using
std::thread, which to implement it.
- This was found compiling the library in a Debian (bullseye) container.
2024-08-18 19:19:29 +00:00
Eduardo Arias
293cd214c7
Removed usage of pthreads and replaced with std C++ features
...
- Replaced pthread_mutex_t in modsecurity::operators::Pm with std::mutex
- Replaced pthread's thread usage in reading_logs_via_rule_message
example with std::thread.
- Simplified and modernized C++ code.
- Removed unnecessary includes of pthread.h
2024-08-09 11:34:40 -07:00
Eduardo Arias
59254fe3bd
Simplifiy configuration to build libModSecurity with std C++17
...
- Leveraged autoconf again to check whether the C++ compiler supports
the required standard version and build using it.
- Replaced the outdaded `ax_cxx_compile_stdcxx_11.m4` macro with the
latest version of `ax_cxx_compile_stdcxx` which supports C++17.
- https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
- https://raw.githubusercontent.com/autoconf-archive/autoconf-archive/e4e5269db2764b9f53d759c24750ac6ca38e02ea/m4/ax_cxx_compile_stdcxx.m4
- This should also streamline updating to C++20 in the future.
2024-08-08 11:23:35 -07:00
Eduardo Arias
942c8ba606
Replaced usage of usleep (not available in Visual C++) with C++11's std::this_thread::sleep_for & std::chrono::microseconds.
...
- disabled build error from warning C4716 because process_request does
not return a value and Visual C++ doesn't support [[noreturn]]
2024-05-03 23:05:34 -03:00
Eduardo Arias
1f419bba8f
Implement sonarcloud suggestions
2024-05-02 17:18:31 -03:00
Eduardo Arias
b872f11f68
Fixed memory leak in examples/reading_logs_via_rule_message
2024-04-28 14:55:06 -03:00
Ervin Hegedus
734646dbf1
Merge pull request #3096 from gberkes/v3/sonar_return_never_will_be_executed
...
Clean up 'return' never will be executed.
2024-02-27 22:25:05 +01:00
gberkes
64dfe41cec
Refactor: Use pthread_exit(nullptr) instead of pthread_exit(NULL) for type safety.
2024-02-27 19:21:58 +00:00
gberkes
bf6042dd16
Marked the process_request() function with the [[noreturn]] attribute, as pthread_exit() does not return.
2024-02-26 15:38:39 +00:00
gberkes
7b56db1811
Clean up 'return' never will be executed.
2024-02-26 08:49:05 +00:00
Mirko Dziadzka
367a871f30
Bump the C++ version from C++11 to C++17
...
This will allow the usage of more modern features in the future.
2024-02-09 21:57:31 +01:00
Liu Dongmiao
a1980c8419
fix argv in examples
2022-03-20 21:26:25 +08:00
Felipe Zimmerle
4cdcc15334
Revert "Adds suppor for HyperScan in the bulid system"
...
This reverts commit 912704b6d4e45aa601b87c5a4cf4b6061d1bbccb.
2021-02-26 11:33:12 -03:00
Felipe Zimmerle
912704b6d4
Adds suppor for HyperScan in the bulid system
2021-02-26 11:15:02 -03:00
Felipe Zimmerle
2e69ce6ccf
build: Fix curl include path
...
Issue #2519
2021-02-24 13:20:24 -03:00
Felipe Zimmerle
3748d62f19
Changes copyright dates on the code
2021-01-19 09:24:37 -03:00
Felipe Zimmerle
9b40a045bb
Cosmetics: fix some cppcheck complains to please QA
2021-01-13 13:30:04 -03:00
Felipe Zimmerle
6a742cdf76
Refactoring: Renames RulesProperties to RulesSetProperties
2020-02-17 13:17:03 -03:00
Felipe Zimmerle
7495675d54
Refactoring: Renames Rules to RulesSet
...
RulesSet does not only contain rules but alse properties
2020-02-11 14:26:47 -03:00
Felipe Zimmerle
357c140003
Changens copyright year
2020-01-31 10:32:37 -03:00
Felipe Zimmerle
fe98ce4c7d
Cosmetics: address cppcheck warnings
2020-01-30 18:19:34 -03:00
Felipe Zimmerle
df169ea108
Adds support for libMaxMind
2018-03-22 19:11:42 -03:00
Felipe Zimmerle
854a661a2a
Fix gcc compilation issue
2018-02-27 13:22:50 -03:00
Felipe Zimmerle
ff782ddfa4
Having LDADD and LDFLAGS organized on Makefile.am
2018-02-21 14:26:47 -03:00
Felipe Zimmerle
3fb71f32d8
Coding style fixes
2017-11-13 22:32:11 -03:00
Felipe Zimmerle
1189e9b0ef
Adds support to LUA in configure scripts
2017-10-31 09:59:12 -03:00
Felipe Zimmerle
7622866f97
Adds support for @fuzzyHash
...
Issue #997
2017-10-26 17:44:17 -03:00
Felipe Zimmerle
616a95bfe0
Adds -lpthread to the reading_logs_via_rule_message example
2017-06-07 14:22:33 -03:00
Felipe Zimmerle
2a5085255e
Using multiple threads in reading logs via rule message example
2017-06-03 16:40:47 -03:00
Felipe Zimmerle
e2af60e765
Expands log_cb to share ruleMessage structure instead text
...
Text version still available and it is the default options
2017-03-06 15:02:04 -03:00