Commit 1bbe92e7 authored by Ričardas Barkauskas's avatar Ričardas Barkauskas Committed by Alexandre Julliard

ws2_32: Don't post completion packet if sending fails with error immediately.

parent fa4a90e6
......@@ -3885,9 +3885,7 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
}
if (n == -1 && errno != EAGAIN)
{
int loc_errno = errno;
err = wsaErrno();
if (cvalue) WS_AddCompletion( s, cvalue, sock_get_ntstatus(loc_errno), 0 );
goto error;
}
......
......@@ -5321,10 +5321,10 @@ static void test_completion_port(void)
bret = GetQueuedCompletionStatus( io_port, &num_bytes, &key, &olp, 200 );
ok(bret == FALSE, "GetQueuedCompletionStatus returned %u\n", bret );
todo_wine ok(GetLastError() == WAIT_TIMEOUT, "Last error was %d\n", GetLastError());
todo_wine ok(key == 0xdeadbeef, "Key is %lu\n", key);
todo_wine ok(num_bytes == 0xdeadbeef, "Number of bytes transfered is %u\n", num_bytes);
todo_wine ok(!olp, "Overlaped structure is at %p\n", olp);
ok(GetLastError() == WAIT_TIMEOUT, "Last error was %d\n", GetLastError());
ok(key == 0xdeadbeef, "Key is %lu\n", key);
ok(num_bytes == 0xdeadbeef, "Number of bytes transfered is %u\n", num_bytes);
ok(!olp, "Overlaped structure is at %p\n", olp);
if (dest != INVALID_SOCKET)
closesocket(dest);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment