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:
Hennadii Stepanov
2026-06-27 11:26:41 +01:00
parent 7ac25c9177
commit f395acdeee
13 changed files with 49 additions and 49 deletions

View File

@@ -333,7 +333,7 @@ static IntrRecvError InterruptibleRecv(uint8_t* data, size_t len, std::chrono::m
// we're approaching the end of the specified total timeout
const auto remaining = std::chrono::milliseconds{endTime - curTime};
const auto timeout = std::min(remaining, std::chrono::milliseconds{MAX_WAIT_FOR_IO});
if (!sock.Wait(timeout, Sock::RECV)) {
if (!sock.Wait(timeout, Sock::RecvEvent)) {
return IntrRecvError::NetworkError;
}
} else {
@@ -603,7 +603,7 @@ static bool ConnectToSocket(const Sock& sock,
// Connection didn't actually fail, but is being established
// asynchronously. Thus, use async I/O api (select/poll)
// synchronously to check for successful connection with a timeout.
const Sock::Event requested = Sock::RECV | Sock::SEND;
const Sock::Event requested = Sock::RecvEvent | Sock::SendEvent;
Sock::Event occurred;
if (!sock.Wait(timeout, requested, &occurred)) {
LogInfo("wait for connect to %s failed: %s\n",