mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 13:42:10 +02:00
scripted-diff: Rename Sock::{RECV,SEND,ERR}
The `ERR` macro is defined on illumos-based systems in the `regset.h`
header included by the Boost.Test framework, which causes a compilation
error.
-BEGIN VERIFY SCRIPT-
ren1() { sed -i "s/\<$1\>/$2/g" $( git grep -l "$1" ./src/util/sock.* ./src/httpserver.h ) ; }
ren1 RECV RecvEvent
ren1 SEND SendEvent
ren1 ERR ErrorEvent
ren2() { sed -i "s/\<$1\>/$2/g" $( git grep -l "$1" ./src/ ) ; }
ren2 Sock::RECV Sock::RecvEvent
ren2 Sock::SEND Sock::SendEvent
ren2 Sock::ERR Sock::ErrorEvent
-END VERIFY SCRIPT-
This commit is contained in:
@@ -133,16 +133,16 @@ bool TorControlConnection::WaitForData(std::chrono::milliseconds timeout)
|
||||
if (!m_sock) return false;
|
||||
|
||||
Sock::Event event{0};
|
||||
if (!m_sock->Wait(timeout, Sock::RECV, &event)) {
|
||||
if (!m_sock->Wait(timeout, Sock::RecvEvent, &event)) {
|
||||
return false;
|
||||
}
|
||||
if (event & Sock::ERR) {
|
||||
if (event & Sock::ErrorEvent) {
|
||||
LogDebug(BCLog::TOR, "Socket error detected");
|
||||
Disconnect();
|
||||
return false;
|
||||
}
|
||||
|
||||
return (event & Sock::RECV);
|
||||
return (event & Sock::RecvEvent);
|
||||
}
|
||||
|
||||
bool TorControlConnection::ReceiveAndProcess()
|
||||
|
||||
Reference in New Issue
Block a user