From: Jeremy Allison Date: Tue, 27 Mar 2007 22:37:42 +0000 (+0000) Subject: r21994: Ignore keepalives in the correct buffer (out not in :-). X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~828 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9785528ddf26c4943e8bdfcf7694314a52218520;p=thirdparty%2Fsamba.git r21994: Ignore keepalives in the correct buffer (out not in :-). Jeremy. --- diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c index 95d7cdadd78..e4712d2f655 100644 --- a/source/libsmb/clientgen.c +++ b/source/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/source/libsmb/smb_seal.c b/source/libsmb/smb_seal.c index c80b7f0a906..ed2c66013e8 100644 --- a/source/libsmb/smb_seal.c +++ b/source/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; }