mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:05:52 +00:00
[MSAFD]
- Pass a valid pointer for lpErrno to WSPBind when performing an implicit bind - Remove the hack in MsafdReturnWithErrno for dealing with stupid callers that provide don't provide a valid Errno pointer svn path=/trunk/; revision=47378
This commit is contained in:
parent
219cc11d6a
commit
54b6aff827
2 changed files with 10 additions and 12 deletions
|
@ -384,20 +384,17 @@ DWORD MsafdReturnWithErrno(NTSTATUS Status,
|
|||
DWORD Received,
|
||||
LPDWORD ReturnedBytes)
|
||||
{
|
||||
if (Errno)
|
||||
{
|
||||
*Errno = TranslateNtStatusError(Status);
|
||||
*Errno = TranslateNtStatusError(Status);
|
||||
|
||||
if (ReturnedBytes)
|
||||
{
|
||||
if (!*Errno)
|
||||
*ReturnedBytes = Received;
|
||||
else
|
||||
*ReturnedBytes = 0;
|
||||
}
|
||||
if (ReturnedBytes)
|
||||
{
|
||||
if (!*Errno)
|
||||
*ReturnedBytes = Received;
|
||||
else
|
||||
*ReturnedBytes = 0;
|
||||
}
|
||||
|
||||
return Status ? SOCKET_ERROR : 0;
|
||||
return *Errno ? SOCKET_ERROR : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -540,7 +540,8 @@ WSPSendTo(SOCKET Handle,
|
|||
BindAddress,
|
||||
&BindAddressLength);
|
||||
/* Bind it */
|
||||
WSPBind(Handle, BindAddress, BindAddressLength, NULL);
|
||||
if (WSPBind(Handle, BindAddress, BindAddressLength, lpErrno) == SOCKET_ERROR)
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
|
||||
RemoteAddress = HeapAlloc(GlobalHeap, 0, 0x6 + SocketAddressLength);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue