Commit 2543d4b0 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32/tests: Call getsockname() on the right socket.

Also fixes spurious test failures wherein the broken call would return ENOTSOCK. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent dc478696
......@@ -565,7 +565,7 @@ static void test_poll(void)
ret = bind(client, (const struct sockaddr *)&bind_addr, sizeof(bind_addr));
ok(!ret, "got error %u\n", WSAGetLastError());
len = sizeof(addr);
ret = getsockname(listener, (struct sockaddr *)&addr, &len);
ret = getsockname(client, (struct sockaddr *)&addr, &len);
ok(!ret, "got error %u\n", WSAGetLastError());
check_poll(client, event, AFD_POLL_WRITE);
......@@ -1046,7 +1046,7 @@ static void test_recv(void)
ret = bind(client, (const struct sockaddr *)&bind_addr, sizeof(bind_addr));
ok(!ret, "got error %u\n", WSAGetLastError());
len = sizeof(addr);
ret = getsockname(listener, (struct sockaddr *)&addr, &len);
ret = getsockname(client, (struct sockaddr *)&addr, &len);
ok(!ret, "got error %u\n", WSAGetLastError());
memset(buffer, 0xcc, sizeof(buffer));
......
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