Merge the cli_shutdown change from 2_2. All except one call to
authorVolker Lendecke <vlendec@samba.org>
Wed, 11 Sep 2002 15:18:53 +0000 (15:18 +0000)
committerVolker Lendecke <vlendec@samba.org>
Wed, 11 Sep 2002 15:18:53 +0000 (15:18 +0000)
attempt_netbios_... assumed that cli_shutdown was _not_ called on
error anyway...

Volker

source/libsmb/cliconnect.c
source/rpc_server/srv_spoolss_nt.c

index 1f3635d6d723236e0d01ef85b1095782b0d618b0..6c5c5e0b0e76bd3e3ed9e86867149b868ad8b56d 100644 (file)
@@ -1306,7 +1306,6 @@ BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char
 
                        DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER \
 with error %s.\n", desthost, cli_errstr(cli) ));
-                       cli_shutdown(cli);
                        return False;
                }
 
@@ -1323,7 +1322,6 @@ with error %s.\n", desthost, cli_errstr(cli) ));
                                !cli_session_request(cli, &calling, &smbservername)) {
                        DEBUG(0,("attempt_netbios_session_request: %s rejected the session for \
 name *SMBSERVER with error %s\n", desthost, cli_errstr(cli) ));
-                       cli_shutdown(cli);
                        return False;
                }
        }
index 8b5dcd3b6cf81b1d72a1795309db37ea14ed8800..5231e9e681c27e2fe3e1545b6ebd16839b9a14a8 100644 (file)
@@ -2296,6 +2296,7 @@ static BOOL spoolss_connect_to_client(struct cli_state *the_cli, char *remote_ma
        if (!attempt_netbios_session_request(the_cli, global_myname, remote_machine, &the_cli->dest_ip)) {
                DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request.\n", 
                        remote_machine));
+               cli_shutdown(the_cli);
                return False;
        }