From 5bd0a93976f6818187e70a4446257d90a41c7ff1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 17 Aug 2021 12:06:22 +0100 Subject: Add an API for checking if I/O hooks are ready or not. --- src/modules/m_haproxy.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modules/m_haproxy.cpp') diff --git a/src/modules/m_haproxy.cpp b/src/modules/m_haproxy.cpp index f7ef52213..ab3251031 100644 --- a/src/modules/m_haproxy.cpp +++ b/src/modules/m_haproxy.cpp @@ -384,6 +384,11 @@ class HAProxyHook : public IOHookMiddle sock->AddIOHook(this); } + bool IsHookReady() const override + { + return state == HPS_CONNECTED; + } + int OnStreamSocketWrite(StreamSocket* sock, StreamSocket::SendQueue& uppersendq) CXX11_OVERRIDE { // We don't need to implement this. -- cgit v1.3.1-10-gc9f91 From 6646c9fbeab6cd85e4efcff9ffb16d11ee617650 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 22 Sep 2021 20:49:32 +0100 Subject: Use CXX11_OVERRIDE instead of the override keyword. --- include/modules/ssl.h | 2 +- src/modules/m_haproxy.cpp | 2 +- src/modules/m_websocket.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_haproxy.cpp') diff --git a/include/modules/ssl.h b/include/modules/ssl.h index 9e8f7ebe0..84e2ab3ef 100644 --- a/include/modules/ssl.h +++ b/include/modules/ssl.h @@ -260,7 +260,7 @@ class SSLIOHook : public IOHook virtual bool GetServerName(std::string& out) const = 0; /** @copydoc IOHook::IsHookReady */ - bool IsHookReady() const override { return status == STATUS_OPEN; } + bool IsHookReady() const CXX11_OVERRIDE { return status == STATUS_OPEN; } }; /** Helper functions for obtaining TLS (SSL) client certificates and key fingerprints diff --git a/src/modules/m_haproxy.cpp b/src/modules/m_haproxy.cpp index ab3251031..d50d1ff09 100644 --- a/src/modules/m_haproxy.cpp +++ b/src/modules/m_haproxy.cpp @@ -384,7 +384,7 @@ class HAProxyHook : public IOHookMiddle sock->AddIOHook(this); } - bool IsHookReady() const override + bool IsHookReady() const CXX11_OVERRIDE { return state == HPS_CONNECTED; } diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index 8ac8a50e3..58ce8507d 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -479,7 +479,7 @@ class WebSocketHook : public IOHookMiddle sock->AddIOHook(this); } - bool IsHookReady() const override + bool IsHookReady() const CXX11_OVERRIDE { return state == STATE_ESTABLISHED; } -- cgit v1.3.1-10-gc9f91