mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-07-17 15:16:03 +02:00
formatting
Build and Deploy on local RHEL9 / build (push) Successful in 2m17s
Build on RHEL9 docker image / build (push) Successful in 4m15s
Build and Deploy on local RHEL8 / build (push) Successful in 4m59s
Build on RHEL8 docker image / build (push) Successful in 5m2s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m42s
Run Simulator Tests on local RHEL8 / build (push) Successful in 22m9s
Build and Deploy on local RHEL9 / build (push) Successful in 2m17s
Build on RHEL9 docker image / build (push) Successful in 4m15s
Build and Deploy on local RHEL8 / build (push) Successful in 4m59s
Build on RHEL8 docker image / build (push) Successful in 5m2s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m42s
Run Simulator Tests on local RHEL8 / build (push) Successful in 22m9s
This commit is contained in:
@@ -27,8 +27,8 @@ ClientSocket::ClientSocket(std::string stype, const std::string &host,
|
||||
|
||||
if (getaddrinfo(host.c_str(), nullptr, &hints, &result) != 0) {
|
||||
|
||||
|
||||
auto msg = fmt::format("Cannot resolve {} hostname: '{}'", to_lower(socketType), host);
|
||||
auto msg = fmt::format("Cannot resolve {} hostname: '{}'",
|
||||
to_lower(socketType), host);
|
||||
throwError(msg);
|
||||
}
|
||||
|
||||
@@ -43,9 +43,8 @@ ClientSocket::ClientSocket(std::string stype, const std::string &host,
|
||||
if (::connect(getSocketId(), (struct sockaddr *)&serverAddr,
|
||||
sizeof(serverAddr)) != 0) {
|
||||
freeaddrinfo(result);
|
||||
auto msg = fmt::format(
|
||||
"Cannot connect to {} on {}:{}\n",
|
||||
to_lower(socketType), host, port);
|
||||
auto msg = fmt::format("Cannot connect to {} on {}:{}\n",
|
||||
to_lower(socketType), host, port);
|
||||
|
||||
throwError(msg);
|
||||
}
|
||||
@@ -58,7 +57,8 @@ ClientSocket::ClientSocket(std::string sType, struct sockaddr_in addr)
|
||||
if (::connect(getSocketId(), (struct sockaddr *)&addr, sizeof(addr)) != 0) {
|
||||
char address[INET_ADDRSTRLEN];
|
||||
inet_ntop(AF_INET, &addr.sin_addr, address, INET_ADDRSTRLEN);
|
||||
auto msg = fmt::format("Cannot connect to {} on {}:{}", to_lower(socketType), address, addr.sin_port);
|
||||
auto msg = fmt::format("Cannot connect to {} on {}:{}",
|
||||
to_lower(socketType), address, addr.sin_port);
|
||||
throwError(msg);
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,8 @@ void ClientSocket::readReply(int &ret, void *retval, size_t retval_size) {
|
||||
}
|
||||
// debugging
|
||||
catch (SocketError &e) {
|
||||
auto msg = fmt::format("While reading reply from {} {}", to_lower(socketType), e.what());
|
||||
auto msg = fmt::format("While reading reply from {} {}",
|
||||
to_lower(socketType), e.what());
|
||||
throwError(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,10 +113,9 @@ int DataSocket::Send(const void *buffer, size_t size) {
|
||||
#endif
|
||||
Timer timer;
|
||||
while (bytes_sent < bytes_expected) {
|
||||
this_send = ::send(
|
||||
getSocketId(),
|
||||
reinterpret_cast<const char *>(buffer) + bytes_sent,
|
||||
bytes_expected - bytes_sent, send_flags);
|
||||
this_send = ::send(getSocketId(),
|
||||
reinterpret_cast<const char *>(buffer) + bytes_sent,
|
||||
bytes_expected - bytes_sent, send_flags);
|
||||
if (this_send < 0 && errno == EINTR)
|
||||
continue; // interrupted by a signal, retry
|
||||
if (this_send <= 0)
|
||||
|
||||
@@ -78,7 +78,7 @@ std::pair<std::string, uint16_t> ParseHostPort(const std::string &s) {
|
||||
std::string to_lower(const std::string &s) {
|
||||
std::string result = s;
|
||||
std::transform(result.begin(), result.end(), result.begin(),
|
||||
[](unsigned char c) { return std::tolower(c); });
|
||||
[](unsigned char c) { return std::tolower(c); });
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user