From 9e00b8c6633769c1f6d462cb5b301c067bdc7dc1 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 26 Jun 2011 17:27:40 +1000 Subject: [PATCH] add function to request a UDP context (private use only since we dont want applications to use UDP) --- include/libnfs-private.h | 1 + lib/init.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/libnfs-private.h b/include/libnfs-private.h index ca67216..9863b0c 100644 --- a/include/libnfs-private.h +++ b/include/libnfs-private.h @@ -73,3 +73,4 @@ void nfs_set_error(struct nfs_context *nfs, char *error_string, ...); struct rpc_context *nfs_get_rpc_context(struct nfs_context *nfs); +struct rpc_context *rpc_init_udp_context(void); diff --git a/lib/init.c b/lib/init.c index aba7e5e..b980eab 100644 --- a/lib/init.c +++ b/lib/init.c @@ -59,6 +59,18 @@ struct rpc_context *rpc_init_context(void) } +struct rpc_context *rpc_init_udp_context(void) +{ + struct rpc_context *rpc; + + rpc = rpc_init_context(); + if (rpc != NULL) { + rpc->is_udp = 1; + } + + return rpc; +} + void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth) { if (rpc->auth != NULL) { -- 2.34.1