Module: check_mk
Branch: master
Commit: def7c89749875f5cee0a0576787634e260875890
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=def7c89749875f…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Fri Dec 22 16:40:38 2017 +0100
Windows agent: refactor eventlog state read/write
* Tokenize statefile lines with std::regex and
std::regex_token_iterator.
* Handle state parse errors correctly.
* Use file streams for statefile I/O instead of file pointers.
* Unit test the parsing functionality.
Change-Id: Iec5c944e34174f925e3af99846651f3335e0c93f
---
agents/windows/Makefile.am | 13 ++++-
agents/windows/build_version | 2 +-
agents/windows/sections/SectionEventlog.cc | 61 ++++++++++----------
agents/windows/sections/SectionEventlog.h | 3 +-
agents/windows/stringutil.h | 11 ++++
.../windows/test/sections/SectionEventlogTest.cc | 65 ++++++++++++++++++++++
agents/windows/test/stringutilTest.cc | 41 ++++++++++++++
agents/windows/types.h | 6 ++
8 files changed, 170 insertions(+), 32 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=def7c89749…