X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Finit.c;h=5663f250123ef1b6bccf24b0b84feae768083961;hb=5e9910f0f0b2a1c71a08e910e7123efcadef46bf;hp=aba7e5e0981205002f1c0ca71586163a8bca5fcc;hpb=1896d37bfaae78bfa0e6ee3e3fb19b0a92bb1adb;p=deb_libnfs.git diff --git a/lib/init.c b/lib/init.c index aba7e5e..5663f25 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) { @@ -136,6 +148,11 @@ void rpc_destroy_context(struct rpc_context *rpc) rpc->error_string = NULL; } + if (rpc->udp_dest != NULL) { + free(rpc->udp_dest); + rpc->udp_dest = NULL; + } + free(rpc); }