r446: Close the open NT pipes before the tdis.
authorVolker Lendecke <vlendec@samba.org>
Sun, 2 May 2004 10:42:08 +0000 (10:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:51:23 +0000 (10:51 -0500)
Volker
(This used to be commit ef80490baf9ce38b505b4b322051ae6e3332d662)

source3/libsmb/clientgen.c

index 6edc83c9d79088b0ce0c7da01a877ecbe301b450..b75d6be0a60eeb8154328f31ce66b0e6c8a2eea7 100644 (file)
@@ -367,6 +367,9 @@ void cli_nt_netlogon_netsec_session_close(struct cli_state *cli)
 
 void cli_close_connection(struct cli_state *cli)
 {
+       cli_nt_session_close(cli);
+       cli_nt_netlogon_netsec_session_close(cli);
+
        /*
         * tell our peer to free his resources.  Wihtout this, when an
         * application attempts to do a graceful shutdown and calls
@@ -382,9 +385,6 @@ void cli_close_connection(struct cli_state *cli)
        if ( (cli->cnum != (uint16)-1) && (cli->smb_rw_error != DO_NOT_DO_TDIS ) )
                cli_tdis(cli);
         
-       cli_nt_session_close(cli);
-       cli_nt_netlogon_netsec_session_close(cli);
-
        SAFE_FREE(cli->outbuf);
        SAFE_FREE(cli->inbuf);