summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clientgen.c2
-rw-r--r--source3/libsmb/smb_seal.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 95d7cdadd7..e4712d2f65 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -107,7 +107,7 @@ BOOL cli_receive_smb_internal(struct cli_state *cli, BOOL eat_keepalives)
again:
ret = client_receive_smb(cli, eat_keepalives);
- if (!eat_keepalives && (CVAL(cli->inbuf,0) == SMBkeepalive)) {
+ if (ret && !eat_keepalives && (CVAL(cli->inbuf,0) == SMBkeepalive)) {
/* Give back the keepalive. */
return True;
}
diff --git a/source3/libsmb/smb_seal.c b/source3/libsmb/smb_seal.c
index c80b7f0a90..ed2c66013e 100644
--- a/source3/libsmb/smb_seal.c
+++ b/source3/libsmb/smb_seal.c
@@ -471,7 +471,7 @@ NTSTATUS cli_decrypt_message(struct cli_state *cli)
NTSTATUS cli_encrypt_message(struct cli_state *cli, char **buf_out)
{
/* Ignore session keepalives. */
- if(CVAL(cli->inbuf,0) == SMBkeepalive) {
+ if(CVAL(cli->outbuf,0) == SMBkeepalive) {
return NT_STATUS_OK;
}