1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-03 12:58:35 +03:00

s3:lib/util_sock: use sys_recv() instead of sys_read() on sockets

This ways the pcap support in socket wrapper sees the received data.

metze
This commit is contained in:
Stefan Metzmacher 2009-03-19 09:06:38 +01:00
parent 2d1fcdc807
commit 0dfdb7b911

View File

@ -519,7 +519,7 @@ NTSTATUS read_socket_with_timeout(int fd, char *buf,
}
while (nread < mincnt) {
readret = sys_read(fd, buf + nread, maxcnt - nread);
readret = sys_recv(fd, buf + nread, maxcnt - nread, 0);
if (readret == 0) {
DEBUG(5,("read_socket_with_timeout: "
@ -588,7 +588,7 @@ NTSTATUS read_socket_with_timeout(int fd, char *buf,
return NT_STATUS_IO_TIMEOUT;
}
readret = sys_read(fd, buf+nread, maxcnt-nread);
readret = sys_recv(fd, buf+nread, maxcnt-nread, 0);
if (readret == 0) {
/* we got EOF on the file descriptor */