Network/SocketImpl: Fix code, once more

This commit is contained in:
Lynix 2017-01-27 16:43:54 +01:00
parent 7602b4a041
commit 80442924c1
1 changed files with 2 additions and 2 deletions

View File

@ -612,7 +612,7 @@ namespace Nz
} }
struct msghdr msgHdr; struct msghdr msgHdr;
std::memset(&msgHdr, 0, sizeof(header)); std::memset(&msgHdr, 0, sizeof(msgHdr));
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
msgHdr.msg_namelen = IpAddressImpl::ToSockAddr(to, nameBuffer.data()); msgHdr.msg_namelen = IpAddressImpl::ToSockAddr(to, nameBuffer.data());
@ -620,7 +620,7 @@ namespace Nz
msgHdr.msg_iov = sysBuffers; msgHdr.msg_iov = sysBuffers;
msgHdr.msg_iovlen = static_cast<int>(bufferCount); msgHdr.msg_iovlen = static_cast<int>(bufferCount);
int sentLength = sendmsg(socket, &msgHdr, MSG_NOSIGNAL); int byteSent = sendmsg(socket, &msgHdr, MSG_NOSIGNAL);
if (byteSent == SOCKET_ERROR) if (byteSent == SOCKET_ERROR)
{ {
int errorCode = GetLastErrorCode(); int errorCode = GetLastErrorCode();