mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
oops, must use read_data() not read(), as read() may only provide
part of the data stream. read_data() is a wrapper to guarantee receiving exactly the requested number of bytes.
This commit is contained in:
@ -68,7 +68,7 @@ BOOL readwrite_pipe(pipes_struct *p, char *data, int len,
|
||||
{
|
||||
return False;
|
||||
}
|
||||
(*rlen) = read(p->m->fd, (*rdata), (*rlen));
|
||||
(*rlen) = read_data(p->m->fd, (*rdata), (*rlen));
|
||||
if ((*rlen) < 0)
|
||||
{
|
||||
return False;
|
||||
@ -115,6 +115,6 @@ int read_pipe(pipes_struct *p, char *data, int n)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return read(p->m->fd, data, n);
|
||||
return read_data(p->m->fd, data, n);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user