Skip to content

Commit

Permalink
Use strerror instead of strerror*_np
Browse files Browse the repository at this point in the history
  • Loading branch information
sm0svx committed Sep 4, 2024
1 parent 6ffddf2 commit 3eaa200
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/svxlink/reflector/ReflectorClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,9 @@ int ReflectorClient::sendMsg(const ReflectorMsg& msg)
}
}
std::cerr << "*** ERROR[" << m_con->remoteHost() << ":"
<< m_con->remotePort() << "]: Write to client failed";
auto errname = strerrorname_np(errno);
if (errname != nullptr)
{
std::cerr << " due to " << errname << ", " << strerrordesc_np(errno);
}
std::cerr << ". Message type=" << msg.type() << "." << std::endl;
<< m_con->remotePort() << "]: Write to client failed due to '"
<< strerror(errno) << "'. Message type=" << msg.type() << "."
<< std::endl;
disconnect();
return -1;
} /* ReflectorClient::sendMsg */
Expand Down

0 comments on commit 3eaa200

Please sign in to comment.