1
0
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:
Andrew Tridgell
2004-10-17 05:07:07 +00:00
committed by Gerald (Jerry) Carter
parent 58a92abd88
commit 6f4926d846
5 changed files with 334 additions and 1 deletions

View File

@@ -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;
}