Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108629849
D32721.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32721.diff
View Options
diff --git a/lib/libnv/msgio.h b/lib/libnv/msgio.h
--- a/lib/libnv/msgio.h
+++ b/lib/libnv/msgio.h
@@ -47,6 +47,6 @@
int fd_recv(int sock, int *fds, size_t nfds);
int buf_send(int sock, void *buf, size_t size);
-int buf_recv(int sock, void *buf, size_t size);
+int buf_recv(int sock, void *buf, size_t size, int flags);
#endif /* !_MSGIO_H_ */
diff --git a/lib/libnv/msgio.c b/lib/libnv/msgio.c
--- a/lib/libnv/msgio.c
+++ b/lib/libnv/msgio.c
@@ -450,7 +450,7 @@
}
int
-buf_recv(int sock, void *buf, size_t size)
+buf_recv(int sock, void *buf, size_t size, int flags)
{
ssize_t done;
unsigned char *ptr;
@@ -461,7 +461,7 @@
ptr = buf;
while (size > 0) {
fd_wait(sock, true);
- done = recv(sock, ptr, size, 0);
+ done = recv(sock, ptr, size, flags);
if (done == -1) {
if (errno == EINTR)
continue;
diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c
--- a/sys/contrib/libnv/nvlist.c
+++ b/sys/contrib/libnv/nvlist.c
@@ -1280,7 +1280,7 @@
size_t nfds, size, i;
int *fds;
- if (buf_recv(sock, &nvlhdr, sizeof(nvlhdr)) == -1)
+ if (buf_recv(sock, &nvlhdr, sizeof(nvlhdr), 0) == -1)
return (NULL);
if (!nvlist_check_header(&nvlhdr))
@@ -1298,7 +1298,7 @@
ret = NULL;
fds = NULL;
- if (buf_recv(sock, buf + sizeof(nvlhdr), size - sizeof(nvlhdr)) == -1)
+ if (buf_recv(sock, buf + sizeof(nvlhdr), size - sizeof(nvlhdr), 0) == -1)
goto out;
if (nfds > 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 11:53 PM (9 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16224317
Default Alt Text
D32721.diff (1 KB)
Attached To
Mode
D32721: libnv: allow passing flags argument to recv()
Attached
Detach File
Event Timeline
Log In to Comment