Fix sending empty nvlist.
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
This commit is contained in:
parent
bf636ac469
commit
7f7fe890a5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261407
@ -364,7 +364,7 @@ buf_recv(int sock, void *buf, size_t size)
|
||||
unsigned char *ptr;
|
||||
|
||||
ptr = buf;
|
||||
do {
|
||||
while (size > 0) {
|
||||
fd_wait(sock, true);
|
||||
done = recv(sock, ptr, size, 0);
|
||||
if (done == -1) {
|
||||
@ -377,7 +377,7 @@ buf_recv(int sock, void *buf, size_t size)
|
||||
}
|
||||
size -= done;
|
||||
ptr += done;
|
||||
} while (size > 0);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user