merge from 2.2
authorGerald Carter <jerry@samba.org>
Wed, 13 Feb 2002 16:44:49 +0000 (16:44 +0000)
committerGerald Carter <jerry@samba.org>
Wed, 13 Feb 2002 16:44:49 +0000 (16:44 +0000)
(This used to be commit 50fa21c995d33601920b3b56a3e03b09262e7fd9)

source3/libsmb/cli_lsarpc.c
source3/libsmb/clierror.c
source3/rpc_client/cli_spoolss_notify.c

index 7ba47d3a18842ebfb6100837d595031ed74fd30c..d3c7db70a297cdbd7f949cc0e4ca83cf5b1eca1d 100644 (file)
@@ -1075,8 +1075,8 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
        }
 
        if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) {
-               DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS \
-session request. Error was %s\n", remote_machine, cli_errstr(&cli) ));
+               DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS session request.\n", 
+                       remote_machine));
                goto done;
        }
  
index 89550d18ed67218765ab2296fcb4f29419fc0155..13ea6b1997be3925b897a0d288986c56c68c8cb4 100644 (file)
@@ -80,6 +80,11 @@ char *cli_errstr(struct cli_state *cli)
        uint8 errclass;
        int i;
 
+       if (!cli->initialised) {
+               fstrcpy(cli_error_message, "[Programmer's error] cli_errstr called on unitialized cli_stat struct!\n");
+               return cli_error_message;
+       }
+
        /* Case #1: RAP error */
        if (cli->rap_error) {
                for (i = 0; rap_errmap[i].message != NULL; i++) {
index 13cdf8bafaa5a601a25d011e83899de4fbb46d27..c31d2fb387160d31f9f14db6172fa244e19cef4e 100644 (file)
@@ -69,8 +69,8 @@ BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine)
        }
   
        if (!attempt_netbios_session_request(cli, global_myname, remote_machine, &cli->dest_ip)) {
-               DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request. Error was %s\n", remote_machine, cli_errstr(cli) ));
-               cli_shutdown(cli);
+               DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request.\n", 
+                       remote_machine));
                return False;
        }