summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c7
-rw-r--r--source3/libsmb/clientgen.c1
2 files changed, 7 insertions, 1 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 01a92a89ba..aa37a29391 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -888,7 +888,12 @@ BOOL cli_ulogoff(struct cli_state *cli)
if (!cli_receive_smb(cli))
return False;
- return !cli_is_error(cli);
+ if (cli_is_error(cli)) {
+ return False;
+ }
+
+ cli->cnum = -1;
+ return True;
}
/****************************************************************************
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 369fba3521..b7bc780a1a 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -282,6 +282,7 @@ struct cli_state *cli_initialise(struct cli_state *cli)
cli->inbuf = (char *)SMB_MALLOC(cli->bufsize+SAFETY_MARGIN);
cli->oplock_handler = cli_oplock_ack;
cli->case_sensitive = False;
+ cli->smb_rw_error = 0;
cli->use_spnego = lp_client_use_spnego();