repositories
/
deb_libnfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove the need for an explicit rpc context for the highlevel function mount_getexports()
[deb_libnfs.git]
/
lib
/
libnfs-sync.c
diff --git
a/lib/libnfs-sync.c
b/lib/libnfs-sync.c
index cef644475f296f2c55719e64a8fcbbe91332dbb4..3b10e0a28a1843f5c420def19af95a30e53e56e2 100644
(file)
--- a/
lib/libnfs-sync.c
+++ b/
lib/libnfs-sync.c
@@
-1093,19
+1093,23
@@
void mount_getexports_cb(struct rpc_context *mount_context _U_, int status, void
}
}
}
}
-struct exportnode *mount_getexports(
struct rpc_context *rpc,
const char *server)
+struct exportnode *mount_getexports(const char *server)
{
struct sync_cb_data cb_data;
{
struct sync_cb_data cb_data;
+ struct rpc_context *rpc;
+
cb_data.is_finished = 0;
cb_data.return_data = NULL;
cb_data.is_finished = 0;
cb_data.return_data = NULL;
+ rpc = rpc_init_context();
if (mount_getexports_async(rpc, server, mount_getexports_cb, &cb_data) != 0) {
if (mount_getexports_async(rpc, server, mount_getexports_cb, &cb_data) != 0) {
- rpc_
set_error(rpc, "mount_getexports_async failed"
);
+ rpc_
destroy_context(rpc
);
return NULL;
}
wait_for_reply(rpc, &cb_data);
return NULL;
}
wait_for_reply(rpc, &cb_data);
+ rpc_destroy_context(rpc);
return cb_data.return_data;
}
return cb_data.return_data;
}