summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-03-19 16:22:47 +0000
committerGerald Carter <jerry@samba.org>2004-03-19 16:22:47 +0000
commit56ce6136792478c63d371a7b187c1318043e081f (patch)
treefba69d1c6080674e3056661f3c79c276c5672f44 /source3/libsmb/clientgen.c
parentebf27cf5a12711ea12058876e609864ad642b53a (diff)
downloadsamba-56ce6136792478c63d371a7b187c1318043e081f.tar.gz
samba-56ce6136792478c63d371a7b187c1318043e081f.tar.bz2
samba-56ce6136792478c63d371a7b187c1318043e081f.zip
updating release notes & merging Derrel Lipman's libsmbclient patch from HEAD
(This used to be commit 5fbfaa687a3674287eeadd205f56b2b253a9e2a9)
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 0873700fc0..8542eea064 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -367,6 +367,17 @@ void cli_nt_netlogon_netsec_session_close(struct cli_state *cli)
void cli_close_connection(struct cli_state *cli)
{
+ /*
+ * tell our peer to free his resources. Wihtout this, when an
+ * application attempts to do a graceful shutdown and calls
+ * smbc_free_context() to clean up all connections, some connections
+ * 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.
+ */
+ if ( cli->cnum != (uint16)-1 )
+ cli_tdis(cli);
+
cli_nt_session_close(cli);
cli_nt_netlogon_netsec_session_close(cli);