From: Ronnie Sahlberg Date: Sun, 26 Jun 2011 07:27:40 +0000 (+1000) Subject: add function to request a UDP context X-Git-Tag: upstream/1.9.6^2~383 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9e00b8c6633769c1f6d462cb5b301c067bdc7dc1;p=deb_libnfs.git add function to request a UDP context (private use only since we dont want applications to use UDP) --- 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) {