Module: check_mk
Branch: master
Commit: efa1663f24edf87720feaba9bc89c80e4cc82a22
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=efa1663f24edf8…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Mon Feb 26 10:04:31 2018 +0100
Windows agent: fix ListenSocket const correctness
---
agents/windows/ListenSocket.cc | 6 +++---
agents/windows/ListenSocket.h | 6 +++---
agents/windows/build_version | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/agents/windows/ListenSocket.cc b/agents/windows/ListenSocket.cc
index 34b024b..ea27ad9 100644
--- a/agents/windows/ListenSocket.cc
+++ b/agents/windows/ListenSocket.cc
@@ -63,7 +63,7 @@ SOCKET ListenSocket::RemoveSocketInheritance(SOCKET oldsocket) const {
return (SOCKET)newhandle;
}
-bool ListenSocket::check_only_from(sockaddr *ip) {
+bool ListenSocket::check_only_from(sockaddr *ip) const {
if (_source_whitelist.size() == 0) return true; // no restriction set
for (only_from_t::const_iterator it_from = _source_whitelist.begin();
@@ -189,7 +189,7 @@ std::string ListenSocket::readableIP(const sockaddr_storage *addr) {
return ip_hr;
}
-sockaddr *ListenSocket::create_sockaddr(int *addr_len) {
+sockaddr *ListenSocket::create_sockaddr(int *addr_len) const {
assert(addr_len != NULL);
sockaddr *result = NULL;
@@ -206,7 +206,7 @@ sockaddr *ListenSocket::create_sockaddr(int *addr_len) {
return result;
}
-SOCKET ListenSocket::acceptConnection() {
+SOCKET ListenSocket::acceptConnection() const {
SOCKET connection;
// Loop forever.
diff --git a/agents/windows/ListenSocket.h b/agents/windows/ListenSocket.h
index 0f96ad8..e9c34f5 100644
--- a/agents/windows/ListenSocket.h
+++ b/agents/windows/ListenSocket.h
@@ -40,7 +40,7 @@ public:
bool supportsIPV4() const;
bool supportsIPV6() const;
- SOCKET acceptConnection();
+ SOCKET acceptConnection() const;
sockaddr_storage address(SOCKET connection) const;
@@ -49,8 +49,8 @@ public:
private:
SOCKET init_listen_socket(int port);
- bool check_only_from(sockaddr *ip);
- sockaddr *create_sockaddr(int *addr_len);
+ bool check_only_from(sockaddr *ip) const;
+ sockaddr *create_sockaddr(int *addr_len) const;
SOCKET RemoveSocketInheritance(SOCKET oldsocket) const;
Logger *_logger;
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 5c5bfcd..ea0965b 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-3118
+3120