diff options
| author | 2026-07-04 11:17:31 +0100 | |
|---|---|---|
| committer | 2026-07-10 11:47:47 +0100 | |
| commit | 651fbb54a1d502e7ae405a71c7297edc0c8514be (patch) | |
| tree | b0d57da4848f47f44118cbf30dbc06ebf59a3822 /modules/spanningtree/treesocket1.cpp | |
| parent | Remove a Perl function that is only used in one place. (diff) | |
Convert BufferedSocketError/BufferedSocketState to an enum class.
Diffstat (limited to 'modules/spanningtree/treesocket1.cpp')
| -rw-r--r-- | modules/spanningtree/treesocket1.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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>& 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; } } |
