Fixed displaying of flags of loaded game.

Fixed incorrect usage  of setsockopt ().
Fixed chat preparation doesn't replace all placeholders.
This commit is contained in:
Dmitry 2019-07-28 21:30:33 +03:00 committed by jeefo
commit 7a6e3febf2
3 changed files with 14 additions and 9 deletions

View file

@ -56,7 +56,7 @@ public:
#if defined(CR_WINDOWS)
WSADATA wsa;
if (WSAStartup (MAKEWORD (1, 1), &wsa) != 0) {
if (WSAStartup (MAKEWORD (2, 2), &wsa) != 0) {
logger.error ("Unable to inialize sockets.");
}
#endif
@ -93,11 +93,11 @@ public:
};
auto timeouts = getTimeouts ();
if (setsockopt (m_socket, SOL_SOCKET, SO_RCVTIMEO, timeouts.first, timeouts.second) < 1) {
if (setsockopt (m_socket, SOL_SOCKET, SO_RCVTIMEO, timeouts.first, timeouts.second) == -1) {
logger.error ("Unable to set SO_RCVTIMEO.");
}
if (setsockopt (m_socket, SOL_SOCKET, SO_SNDTIMEO, timeouts.first, timeouts.second) < 1) {
if (setsockopt (m_socket, SOL_SOCKET, SO_SNDTIMEO, timeouts.first, timeouts.second) == -1) {
logger.error ("Unable to set SO_SNDTIMEO.");
}