Module: check_mk
Branch: master
Commit: c9b1acdacfce4e4f854276e3d2f5e4c6fa2151ca
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c9b1acdacfce4e…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Dec 12 10:33:46 2016 +0100
win-agent: make format
---
agents/windows/EventLog.cc | 9 ++---
agents/windows/EventLog.h | 43 ++++++++++++-----------
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 1326592 -> 1326592 bytes
agents/windows/check_mk_agent-64.unstripped.exe | Bin 15500414 -> 15500414 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 1326592 -> 1326592 bytes
agents/windows/check_mk_agent.exe | Bin 1302016 -> 1302016 bytes
agents/windows/check_mk_agent.msi | Bin 2898432 -> 2898432 bytes
agents/windows/check_mk_agent.unstripped.exe | Bin 13400795 -> 13400795 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 1302016 -> 1302016 bytes
agents/windows/install_agent-64.exe | Bin 585417 -> 585416 bytes
agents/windows/install_agent.exe | Bin 582211 -> 582208 bytes
12 files changed, 28 insertions(+), 26 deletions(-)
diff --git a/agents/windows/EventLog.cc b/agents/windows/EventLog.cc
index c39ec14..d730d07 100644
--- a/agents/windows/EventLog.cc
+++ b/agents/windows/EventLog.cc
@@ -114,7 +114,8 @@ class MessageResolver {
auto iter = _cache.find(dllpath);
if (iter == _cache.end()) {
dll = load_library_ext(dllpath);
- _cache.emplace(std::wstring(dllpath), std::move(HModuleWrapper(dll)));
+ _cache.emplace(std::wstring(dllpath),
+ std::move(HModuleWrapper(dll)));
} else {
dll = iter->second.getHModule();
}
@@ -342,9 +343,9 @@ bool EventLog::fillBuffer() {
DWORD bytes_required;
- if (_log.ReadEventLogW(flags, _record_offset, _buffer,
- &_buffer_used, &bytes_required)) {
- return true;
+ if (_log.ReadEventLogW(flags, _record_offset, _buffer, &_buffer_used,
+ &bytes_required)) {
+ return true;
} else {
DWORD error = GetLastError();
if (error == ERROR_HANDLE_EOF) {
diff --git a/agents/windows/EventLog.h b/agents/windows/EventLog.h
index 9ec20c1..bf6614f 100644
--- a/agents/windows/EventLog.h
+++ b/agents/windows/EventLog.h
@@ -37,22 +37,26 @@ public:
~HModuleWrapper() { close(); }
- HModuleWrapper(const HModuleWrapper &) = delete; // Delete copy
constructor
+ HModuleWrapper(const HModuleWrapper &) = delete; // Delete copy constructor
- HModuleWrapper &operator=(const HModuleWrapper &) = delete; // Delete
assignment operator
+ HModuleWrapper &operator=(const HModuleWrapper &) =
+ delete; // Delete assignment operator
- HModuleWrapper(HModuleWrapper &&from) : _hmodule(from._hmodule) { // Move
constructor
+ HModuleWrapper(HModuleWrapper &&from)
+ : _hmodule(from._hmodule) { // Move constructor
from._hmodule = nullptr;
}
- HModuleWrapper &operator=(HModuleWrapper &&from) = delete; // Move
assignment operator
+ HModuleWrapper &operator=(HModuleWrapper &&from) =
+ delete; // Move assignment operator
-// HModuleWrapper &operator=(HModuleWrapper &&from) { // Move
assignment operator
-// close();
-// _hmodule = from._hmodule;
-// from._hmodule = nullptr;
-// return *this;
-// }
+ // HModuleWrapper &operator=(HModuleWrapper &&from) { //
+ // Move assignment operator
+ // close();
+ // _hmodule = from._hmodule;
+ // from._hmodule = nullptr;
+ // return *this;
+ // }
HMODULE getHModule() { return _hmodule; };
@@ -67,30 +71,29 @@ private:
}
};
-
class EventlogHandle {
public:
explicit EventlogHandle(const std::wstring &name) : _name(name) { open(); }
~EventlogHandle() { close(); }
- EventlogHandle(const EventlogHandle& logHandle) = delete;
+ EventlogHandle(const EventlogHandle &logHandle) = delete;
void reopen() {
close();
open();
}
- bool ReadEventLogW(DWORD dwReadFlags,
- DWORD dwRecordOffset, std::vector<BYTE> &buffer, DWORD
*pnBytesRead,
+ bool ReadEventLogW(DWORD dwReadFlags, DWORD dwRecordOffset,
+ std::vector<BYTE> &buffer, DWORD *pnBytesRead,
DWORD *pnMinNumberOfBytesNeeded) {
- return ::ReadEventLogW(_handle, dwReadFlags, dwRecordOffset,
- &buffer[0], buffer.size(), pnBytesRead,
- pnMinNumberOfBytesNeeded);
+ return ::ReadEventLogW(_handle, dwReadFlags, dwRecordOffset, &buffer[0],
+ buffer.size(), pnBytesRead,
+ pnMinNumberOfBytesNeeded);
}
DWORD GetOldestEventLogRecord(PDWORD record) {
- return ::GetOldestEventLogRecord(_handle, record);
+ return ::GetOldestEventLogRecord(_handle, record);
}
DWORD GetNumberOfEventLogRecords(PDWORD record) {
@@ -105,9 +108,7 @@ public:
}
}
- void close() {
- CloseEventLog(_handle);
- }
+ void close() { CloseEventLog(_handle); }
private:
std::wstring _name;
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 317509b..1ff3df5 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-2160
+2162
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 025fe27..7b3a677 100755
Binary files a/agents/windows/check_mk_agent-64.exe and
b/agents/windows/check_mk_agent-64.exe differ
diff --git a/agents/windows/check_mk_agent-64.unstripped.exe
b/agents/windows/check_mk_agent-64.unstripped.exe
index d605670..b70ecae 100755
Binary files a/agents/windows/check_mk_agent-64.unstripped.exe and
b/agents/windows/check_mk_agent-64.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent-64.unversioned.exe
b/agents/windows/check_mk_agent-64.unversioned.exe
index 4384b94..9b2b092 100755
Binary files a/agents/windows/check_mk_agent-64.unversioned.exe and
b/agents/windows/check_mk_agent-64.unversioned.exe differ
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index 9acf885..e8b3488 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi
index 4c407b5..ec69272 100755
Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi
differ
diff --git a/agents/windows/check_mk_agent.unstripped.exe
b/agents/windows/check_mk_agent.unstripped.exe
index f40765d..63eccc3 100755
Binary files a/agents/windows/check_mk_agent.unstripped.exe and
b/agents/windows/check_mk_agent.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent.unversioned.exe
b/agents/windows/check_mk_agent.unversioned.exe
index 6ca635d..7e31782 100755
Binary files a/agents/windows/check_mk_agent.unversioned.exe and
b/agents/windows/check_mk_agent.unversioned.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 19224a5..3550465 100755
Binary files a/agents/windows/install_agent-64.exe and
b/agents/windows/install_agent-64.exe differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index 68fa24e..de8be91 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ