summaryrefslogtreecommitdiffstats
path: root/source/smbd/reply.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-09-24 13:06:21 +0000
committerGerald Carter <jerry@samba.org>2004-09-24 13:06:21 +0000
commitd82a5ff54ebc9e127f06cd1228d3f952728e23c9 (patch)
tree3f837b01c8ec5684e1bf96eac48a7572cbc58db3 /source/smbd/reply.c
parent3cf617a8c779ef153080bd00d20bfaa349603096 (diff)
downloadsamba-d82a5ff54ebc9e127f06cd1228d3f952728e23c9.tar.gz
samba-d82a5ff54ebc9e127f06cd1228d3f952728e23c9.tar.xz
samba-d82a5ff54ebc9e127f06cd1228d3f952728e23c9.zip
r2598: syncing up files for 3.0.8pre1
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r--source/smbd/reply.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 565046061cc..cdf607e2738 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -934,8 +934,8 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
make_dir_struct(p,mask,fname,size,mode,date,conn->case_sensitive);
dptr_fill(p+12,dptr_num);
numentries++;
+ p += DIR_STRUCT_SIZE;
}
- p += DIR_STRUCT_SIZE;
}
}
} /* if (ok ) */
@@ -949,18 +949,12 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
(X/Open spec) */
if(ok && expect_close && numentries == 0 && status_len == 0) {
- if (Protocol < PROTOCOL_NT1) {
- SCVAL(outbuf,smb_rcls,ERRDOS);
- SSVAL(outbuf,smb_err,ERRnofiles);
- }
- /* Also close the dptr - we know it's gone */
+ /* Close the dptr - we know it's gone */
dptr_close(&dptr_num);
+ return ERROR_BOTH(STATUS_NO_MORE_FILES,ERRDOS,ERRnofiles);
} else if (numentries == 0 || !ok) {
- if (Protocol < PROTOCOL_NT1) {
- SCVAL(outbuf,smb_rcls,ERRDOS);
- SSVAL(outbuf,smb_err,ERRnofiles);
- }
dptr_close(&dptr_num);
+ return ERROR_BOTH(STATUS_NO_MORE_FILES,ERRDOS,ERRnofiles);
}
/* If we were called as SMBfunique, then we can close the dirptr now ! */