From 651fbb54a1d502e7ae405a71c7297edc0c8514be Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 4 Jul 2026 11:17:31 +0100 Subject: Convert BufferedSocketError/BufferedSocketState to an enum class. --- modules/spanningtree/treesocket1.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/spanningtree/treesocket1.cpp') diff --git a/modules/spanningtree/treesocket1.cpp b/modules/spanningtree/treesocket1.cpp index b32c8e22b..e47b4d8fc 100644 --- a/modules/spanningtree/treesocket1.cpp +++ b/modules/spanningtree/treesocket1.cpp @@ -52,16 +52,16 @@ TreeSocket::TreeSocket(const std::shared_ptr& link, const std::shared_ptr< { if (!bind.from_ip(link->Bind)) { - state = I_ERROR; + state = BufferedSocketState::ERROR; SetError("Bind address '" + link->Bind + "' is not a valid IPv4 or IPv6 address"); - TreeSocket::OnError(I_ERR_BIND); + TreeSocket::OnError(BufferedSocketError::BIND); return; } else if (bind.family() != dest.family()) { - state = I_ERROR; + state = BufferedSocketState::ERROR; SetError("Bind address '" + bind.addr() + "' is not the same address family as destination address '" + dest.addr() + "'"); - TreeSocket::OnError(I_ERR_BIND); + TreeSocket::OnError(BufferedSocketError::BIND); return; } } @@ -89,7 +89,7 @@ TreeSocket::TreeSocket(int newfd, ListenSocket* via, const irc::sockets::sockadd // IOHook could have encountered a fatal error, e.g. if the TLS ClientHello was already in the queue and there was no common TLS version if (!GetError().empty()) { - TreeSocket::OnError(I_ERR_OTHER); + TreeSocket::OnError(BufferedSocketError::OTHER); return; } } -- cgit v1.3.1-10-gc9f91