summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2004-03-18 17:11:52 +0000
committerRichard Sharpe <sharpe@samba.org>2004-03-18 17:11:52 +0000
commita650789626f7a546367bf950385bfb3ddb2911ff (patch)
tree8258b530c9f7d88ba102e4515512f77ee8329449 /source3/libsmb/clientgen.c
parentef8eae0688a8c9da20c187b9d5cd6a1e4f425142 (diff)
downloadsamba-a650789626f7a546367bf950385bfb3ddb2911ff.tar.gz
samba-a650789626f7a546367bf950385bfb3ddb2911ff.tar.bz2
samba-a650789626f7a546367bf950385bfb3ddb2911ff.zip
Commit Derrell Lipman's changes and fixes to libsmbclient. The build but
I have not tested them beyond building. I did fix the two instances of safe_strxxx that were introduced. (This used to be commit bf89adbcb4c77792004e4ea9da248b71b72b7dbb)
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 20a0483881..28da73894f 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -367,6 +367,16 @@ 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.
+ */
+ cli_tdis(cli);
+
cli_nt_session_close(cli);
cli_nt_netlogon_netsec_session_close(cli);