server: Return STATUS_ADDRESS_ALREADY_ASSOCIATED from IOCTL_AFD_BIND if the socket is already bound.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
10bfe80ad5
commit
a997c3980f
|
@ -1407,7 +1407,7 @@ static void test_bind(void)
|
|||
|
||||
ret = NtDeviceIoControlFile((HANDLE)s, event, NULL, NULL, &io, IOCTL_AFD_BIND,
|
||||
¶ms, 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( ¶ms->addr, in_size - sizeof(int), &unix_addr );
|
||||
if (!unix_len)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue