diff options
author | Jeremy Allison <jra@samba.org> | 2008-01-04 12:56:23 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-01-04 12:56:23 -0800 |
commit | 9254bb4ef1c3c3a52ea8e935edb0e7a86ec3ea7a (patch) | |
tree | d4b770708ccb2a8b100d6817ee039f41b6e1ac00 /source3/client | |
parent | 517ad5318d3d196713b96f69eff8e2f5d38d922a (diff) | |
download | samba-9254bb4ef1c3c3a52ea8e935edb0e7a86ec3ea7a.tar.gz samba-9254bb4ef1c3c3a52ea8e935edb0e7a86ec3ea7a.tar.bz2 samba-9254bb4ef1c3c3a52ea8e935edb0e7a86ec3ea7a.zip |
Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a505043965eec77b5bb9bc60957e8f3b97c8)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 2a86035cf0..fbcfa531ed 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -4328,16 +4328,22 @@ static void readline_callback(void) timeout.tv_usec = 0; sys_select_intr(cli->fd+1,&fds,NULL,NULL,&timeout); - /* We deliberately use receive_smb instead of + /* We deliberately use receive_smb_raw instead of client_receive_smb as we want to receive session keepalives and then drop them here. */ if (FD_ISSET(cli->fd,&fds)) { - if (!receive_smb(cli->fd,cli->inbuf,0,&cli->smb_rw_error)) { + if (!receive_smb_raw(cli->fd,cli->inbuf,0,0,&cli->smb_rw_error)) { DEBUG(0, ("Read from server failed, maybe it closed the " "connection\n")); return; } + if(CVAL(cli->inbuf,0) != SMBkeepalive) { + DEBUG(0, ("Read from server " + "returned unexpected packet!\n")); + return; + } + goto again; } |