]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r21994: Ignore keepalives in the correct buffer (out not in :-).
authorJeremy Allison <jra@samba.org>
Tue, 27 Mar 2007 22:37:42 +0000 (22:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:58 +0000 (12:18 -0500)
Jeremy.

source/libsmb/clientgen.c
source/libsmb/smb_seal.c

index 95d7cdadd78eccc3edd61dd4e1c070362cbe9a15..e4712d2f655eebd5f12ac2246650d0021e5a451b 100644 (file)
@@ -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;
        }
index c80b7f0a906e5ed1b56661f4ed8d011eb53e04a8..ed2c66013e8d29c5cd782e05068de2ac67e71f40 100644 (file)
@@ -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;
        }