r21993: Don't let keepalives interferece with sign or seal
authorJeremy Allison <jra@samba.org>
Tue, 27 Mar 2007 22:27:06 +0000 (22:27 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:58 +0000 (12:18 -0500)
in the client code.
Jeremy.

source/libsmb/clientgen.c

index b3c38f39ae563883ddbfc55dd1192cb7fb83d1d8..95d7cdadd78eccc3edd61dd4e1c070362cbe9a15 100644 (file)
@@ -106,6 +106,11 @@ 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)) {
+               /* Give back the keepalive. */
+               return True;
+       }
        
        if (ret) {
                /* it might be an oplock break request */