mirror of
https://github.com/samba-team/samba.git
synced 2025-11-22 16:23:49 +03:00
r3013: added support for unix domain sockets in the generic socket library. I
will shortly be using this for a rewrite of the intra-smbd messaging library, which is needed to get lock timeouts working properly (and share modes, oplocks etc)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
58a92abd88
commit
6f4926d846
@@ -150,7 +150,7 @@ static NTSTATUS ipv4_tcp_listen(struct socket_context *sock,
|
||||
static NTSTATUS ipv4_tcp_accept(struct socket_context *sock, struct socket_context **new_sock, uint32_t flags)
|
||||
{
|
||||
struct sockaddr_in cli_addr;
|
||||
socklen_t cli_addr_len = 0;
|
||||
socklen_t cli_addr_len = sizeof(cli_addr);
|
||||
int new_fd;
|
||||
|
||||
new_fd = accept(sock->fd, (struct sockaddr *)&cli_addr, &cli_addr_len);
|
||||
@@ -167,6 +167,7 @@ static NTSTATUS ipv4_tcp_accept(struct socket_context *sock, struct socket_conte
|
||||
|
||||
(*new_sock) = talloc_p(NULL, struct socket_context);
|
||||
if (!(*new_sock)) {
|
||||
close(new_fd);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user