mirror of
https://github.com/samba-team/samba.git
synced 2025-11-13 08:23:49 +03:00
r15356: Remove unused 'flags' argument from socket_send() and friends.
This is in preperation for making TLS a socket library. Andrew Bartlett
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
2961d545fb
commit
a312812b92
@@ -224,23 +224,13 @@ static NTSTATUS ipv6_tcp_accept(struct socket_context *sock, struct socket_conte
|
||||
}
|
||||
|
||||
static NTSTATUS ipv6_tcp_recv(struct socket_context *sock, void *buf,
|
||||
size_t wantlen, size_t *nread, uint32_t flags)
|
||||
size_t wantlen, size_t *nread)
|
||||
{
|
||||
ssize_t gotlen;
|
||||
int flgs = 0;
|
||||
|
||||
/* TODO: we need to map all flags here */
|
||||
if (flags & SOCKET_FLAG_PEEK) {
|
||||
flgs |= MSG_PEEK;
|
||||
}
|
||||
|
||||
if (flags & SOCKET_FLAG_BLOCK) {
|
||||
flgs |= MSG_WAITALL;
|
||||
}
|
||||
|
||||
*nread = 0;
|
||||
|
||||
gotlen = recv(sock->fd, buf, wantlen, flgs);
|
||||
gotlen = recv(sock->fd, buf, wantlen, 0);
|
||||
if (gotlen == 0) {
|
||||
return NT_STATUS_END_OF_FILE;
|
||||
} else if (gotlen == -1) {
|
||||
@@ -253,14 +243,13 @@ static NTSTATUS ipv6_tcp_recv(struct socket_context *sock, void *buf,
|
||||
}
|
||||
|
||||
static NTSTATUS ipv6_tcp_send(struct socket_context *sock,
|
||||
const DATA_BLOB *blob, size_t *sendlen, uint32_t flags)
|
||||
const DATA_BLOB *blob, size_t *sendlen)
|
||||
{
|
||||
ssize_t len;
|
||||
int flgs = 0;
|
||||
|
||||
*sendlen = 0;
|
||||
|
||||
len = send(sock->fd, blob->data, blob->length, flgs);
|
||||
len = send(sock->fd, blob->data, blob->length, 0);
|
||||
if (len == -1) {
|
||||
return map_nt_error_from_unix(errno);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user