X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Fsocket.c;h=b750d6f16d275c1faee7a1d2a300ea0fa1cba296;hb=766bb4af757b6f07c316337f34221ddb769fb749;hp=1676084f21dfad95b764c74cef4997af46cc303d;hpb=6d89ace041388b1770167eb473ac539ae74f37db;p=deb_libnfs.git diff --git a/lib/socket.c b/lib/socket.c index 1676084..b750d6f 100644 --- 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; } +#ifndef TCP_SYNCNT +#define TCP_SYNCNT 7 +#endif + 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; } + +void rpc_set_fd(struct rpc_context *rpc, int fd) +{ + assert(rpc->magic == RPC_CONTEXT_MAGIC); + + rpc->fd = fd; +}