Commit a997c398 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Return STATUS_ADDRESS_ALREADY_ASSOCIATED from IOCTL_AFD_BIND if the…

server: Return STATUS_ADDRESS_ALREADY_ASSOCIATED from IOCTL_AFD_BIND if the socket is already bound. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 10bfe80a
......@@ -1407,7 +1407,7 @@ static void test_bind(void)
ret = NtDeviceIoControlFile((HANDLE)s, event, NULL, NULL, &io, IOCTL_AFD_BIND,
&params, sizeof(params), &addr, sizeof(addr));
todo_wine ok(ret == STATUS_ADDRESS_ALREADY_ASSOCIATED, "got %#x\n", ret);
ok(ret == STATUS_ADDRESS_ALREADY_ASSOCIATED, "got %#x\n", ret);
s2 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
......
......@@ -2405,6 +2405,12 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 0;
}
if (sock->bound)
{
set_error( STATUS_ADDRESS_ALREADY_ASSOCIATED );
return 0;
}
unix_len = sockaddr_to_unix( &params->addr, in_size - sizeof(int), &unix_addr );
if (!unix_len)
{
......
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