X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Flibnfs-sync.c;h=bd6048eb2751233cf3f66e4f105ec39333a091cb;hb=a3d44462cb5b10be80d622b964aabd12b212442a;hp=0340edaabbc728f5d271132f9cc75581bfd3c1dd;hpb=b990de23c6cb1c172487f21574b3725e44461734;p=deb_libnfs.git diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index 0340eda..bd6048e 100644 --- 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; }