From 4248fbe6a676ccb686b8beaab641dd77db767c3b Mon Sep 17 00:00:00 2001 From: bp Date: Tue, 22 Nov 2005 07:13:00 +0000 Subject: Fix interaction with Windows 2000/XP based servers: If the complete reply on the TRANS2_FIND_FIRST2 request fits exactly into one responce packet, then next call to TRANS2_FIND_NEXT2 will return zero entries and server will close current transaction. To avoid subsequent errors we should not perform FIND_CLOSE2 request. PR: kern/78953 Submitted by: Jim Carroll --- sys/fs/smbfs/smbfs_smb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/fs/smbfs') diff --git a/sys/fs/smbfs/smbfs_smb.c b/sys/fs/smbfs/smbfs_smb.c index f45d2ac..61129bd 100644 --- a/sys/fs/smbfs/smbfs_smb.c +++ b/sys/fs/smbfs/smbfs_smb.c @@ -1224,8 +1224,10 @@ smbfs_smb_trans2find2(struct smbfs_fctx *ctx) return error; if ((error = md_get_uint16le(mdp, &tw)) != 0) return error; - if (ctx->f_ecnt == 0) + if (ctx->f_ecnt == 0) { + ctx->f_flags |= SMBFS_RDD_EOF | SMBFS_RDD_NOCLOSE; return ENOENT; + } ctx->f_rnameofs = tw; mdp = &t2p->t2_rdata; if (mdp->md_top == NULL) { -- cgit v1.1