repositories
/
deb_libnfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nfs_mknod_async: fix use-after-free
[deb_libnfs.git]
/
lib
/
socket.c
diff --git
a/lib/socket.c
b/lib/socket.c
index 1676084f21dfad95b764c74cef4997af46cc303d..b750d6f16d275c1faee7a1d2a300ea0fa1cba296 100644
(file)
--- a/
lib/socket.c
+++ b/
lib/socket.c
@@
-399,6
+399,10
@@
void rpc_set_tcp_syncnt(struct rpc_context *rpc, int v)
rpc->tcp_syncnt = v;
}
rpc->tcp_syncnt = v;
}
+#ifndef TCP_SYNCNT
+#define TCP_SYNCNT 7
+#endif
+
static int rpc_connect_sockaddr_async(struct rpc_context *rpc, struct sockaddr_storage *s)
{
int socksize;
static int rpc_connect_sockaddr_async(struct rpc_context *rpc, struct sockaddr_storage *s)
{
int socksize;
@@
-703,3
+707,10
@@
int rpc_queue_length(struct rpc_context *rpc)
}
return i;
}
}
return i;
}
+
+void rpc_set_fd(struct rpc_context *rpc, int fd)
+{
+ assert(rpc->magic == RPC_CONTEXT_MAGIC);
+
+ rpc->fd = fd;
+}