diff options
author | Alexander Bokovoy <ab@samba.org> | 2004-04-06 11:45:02 +0000 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2004-04-06 11:45:02 +0000 |
commit | 7c9d6291e2611982fd7a144809787f3ca6ce7833 (patch) | |
tree | 5e917331b039a5395135370c82e56a5f484bd0e7 /source/libsmb | |
parent | d422d9a1a5b042f64ee5c0b120906cdaf187cfb3 (diff) | |
download | samba-7c9d6291e2611982fd7a144809787f3ca6ce7833.tar.gz samba-7c9d6291e2611982fd7a144809787f3ca6ce7833.tar.xz samba-7c9d6291e2611982fd7a144809787f3ca6ce7833.zip |
r76: Fix smbfs problem with Tree Disconnect issued before smbfs starts its work.
We use cli_state.smb_rw_error to pass this specific case into cli_close_connection()
from smbmount as smb_rw_error can have only selected number of states and
it is ignored in cli_close_connection().
Compiled and tested by Lars Mueller from SuSE on x86, x86_64, ppc, ppc64, s390 and
s390x.
Diffstat (limited to 'source/libsmb')
-rw-r--r-- | source/libsmb/clientgen.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c index 66edc3ce38b..6edc83c9d79 100644 --- a/source/libsmb/clientgen.c +++ b/source/libsmb/clientgen.c @@ -374,8 +374,12 @@ void cli_close_connection(struct cli_state *cli) * can remain active on the peer end, until some (long) timeout period * later. This tree disconnect forces the peer to clean up, since the * connection will be going away. + * + * Also, do not do tree disconnect when cli->smb_rw_error is DO_NOT_DO_TDIS + * the only user for this so far is smbmount which passes opened connection + * down to kernel's smbfs module. */ - if ( cli->cnum != (uint16)-1 ) + if ( (cli->cnum != (uint16)-1) && (cli->smb_rw_error != DO_NOT_DO_TDIS ) ) cli_tdis(cli); cli_nt_session_close(cli); |