1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-23 16:01:42 +00:00

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
This commit is contained in:
Boris Popov 2005-11-22 07:13:00 +00:00
parent 4796860760
commit cc518d3b67
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152678

View File

@ -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) {