summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-04 19:06:37 -0800
committerJeremy Allison <jra@samba.org>2008-01-04 19:06:37 -0800
commit01afb07321a5af0fdd46fb30bda9419b553c1d5c (patch)
treed685c6a6dfd5674e9394f850ccad999330c7e97c /source3/client/client.c
parent06f80cf8becc84672aad9d8703e1a2fbc80af20c (diff)
parent3d40b197b0312967c8d22af73f18414a9fe053bb (diff)
downloadsamba-01afb07321a5af0fdd46fb30bda9419b553c1d5c.tar.gz
samba-01afb07321a5af0fdd46fb30bda9419b553c1d5c.tar.bz2
samba-01afb07321a5af0fdd46fb30bda9419b553c1d5c.zip
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 3a45f62310faf63cd6864d2cb10f941492eda818)
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 6c00638eb9..a5e4a3863a 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) == -1) {
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;
}