diff options
author | Sam Liddicott <sam@liddicott.com> | 2008-12-05 09:05:47 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-12-05 12:52:19 +0100 |
commit | 39e468f55859c01f7bdaab4086df371d3375099f (patch) | |
tree | c55574701600b288865f01d559ddf57b3d28e19c /source4 | |
parent | 7d8f3cdbfc741aa680f23018a434ae9409b69ef0 (diff) | |
download | samba-39e468f55859c01f7bdaab4086df371d3375099f.tar.gz samba-39e468f55859c01f7bdaab4086df371d3375099f.tar.bz2 samba-39e468f55859c01f7bdaab4086df371d3375099f.zip |
vfs_cifs - Use ntvfs request transport close to close downstream session
When upstream session closes, close the downstream session
Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/ntvfs/cifs/vfs_cifs.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index d133bbc480..e615401e51 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -63,7 +63,17 @@ struct async_info { void *parms; }; -#define SETUP_PID private->tree->session->pid = req->smbpid +#define CHECK_UPSTREAM_OPEN do { \ + if (! private->transport->socket->sock) { \ + req->async_states->state|=NTVFS_ASYNC_STATE_CLOSE; \ + return NT_STATUS_CONNECTION_DISCONNECTED; \ + } \ +} while(0) + +#define SETUP_PID do { \ + private->tree->session->pid = req->smbpid; \ + CHECK_UPSTREAM_OPEN; \ +} while(0) #define SETUP_FILE_HERE(f) do { \ f = ntvfs_handle_get_backend_data(io->generic.in.file.ntvfs, ntvfs); \ |