repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b990de2
)
Sync API: Once the sync nfs_mount() functions is finished we have to clear rpc->conne...
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sun, 9 Oct 2011 08:10:18 +0000
(19:10 +1100)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sun, 9 Oct 2011 08:10:18 +0000
(19:10 +1100)
Otherwise we get a crash once the connect_cb callback is invoked the second time.
lib/libnfs-sync.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/libnfs-sync.c
b/lib/libnfs-sync.c
index 0340edaabbc728f5d271132f9cc75581bfd3c1dd..bd6048eb2751233cf3f66e4f105ec39333a091cb 100644
(file)
--- a/
lib/libnfs-sync.c
+++ b/
lib/libnfs-sync.c
@@
-132,6
+132,7
@@
static void mount_cb(int status, struct nfs_context *nfs, void *data, void *priv
int nfs_mount(struct nfs_context *nfs, const char *server, const char *export)
{
struct sync_cb_data cb_data;
+ struct rpc_context *rpc = nfs_get_rpc_context(nfs);
cb_data.is_finished = 0;
@@
-142,6
+143,9
@@
int nfs_mount(struct nfs_context *nfs, const char *server, const char *export)
wait_for_nfs_reply(nfs, &cb_data);
+ /* Dont want any more callbacks even if the socket is closed */
+ rpc->connect_cb = NULL;
+
return cb_data.status;
}