summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-10-25 23:39:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:03 -0500
commit2d32a937252483c74c8489dd3e8be2c2d9cbd763 (patch)
tree10a4e5d287c3d12f0cb3662e40ffa68018edd65c /source3/smbd/trans2.c
parent445f8c77cac32a7647d64b85829fbf19a8bfd7b5 (diff)
downloadsamba-2d32a937252483c74c8489dd3e8be2c2d9cbd763.tar.gz
samba-2d32a937252483c74c8489dd3e8be2c2d9cbd763.tar.bz2
samba-2d32a937252483c74c8489dd3e8be2c2d9cbd763.zip
r3225: Fix correct use of resume name. Cope with the resume
name not existing. Found using Samba4 RAW-SEARCH. Jeremy. (This used to be commit 74dd2b33ff1ecba752682937c792628e081f17f5)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 9b1f2aa210..ac282ed95f 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1662,7 +1662,7 @@ resume_key = %d resume name = %s continue=%d level = %d\n",
* depend on the last file name instead.
*/
- if(requires_resume_key && *resume_name && !continue_bit) {
+ if(*resume_name && !continue_bit) {
/*
* Fix for NT redirector problem triggered by resume key indexes
@@ -1714,7 +1714,7 @@ resume_key = %d resume name = %s continue=%d level = %d\n",
if(current_pos < 0) {
DEBUG(7,("call_trans2findnext: notfound: seeking to pos %d\n", start_pos));
SeekDir(dirptr, start_pos);
- for(current_pos = start_pos; (dname = ReadDirName(dirptr)) != NULL; SeekDir(dirptr,++current_pos)) {
+ for(current_pos = start_pos; (dname = ReadDirName(dirptr)) != NULL; ++current_pos) {
/*
* Remember, mangle_map is called by
@@ -1737,7 +1737,11 @@ resume_key = %d resume name = %s continue=%d level = %d\n",
}
} /* end for */
} /* end if current_pos */
- } /* end if requires_resume_key && !continue_bit */
+ /* Can't find the name. Just resume from where we were... */
+ if (dname == 0) {
+ SeekDir(dirptr, start_pos);
+ }
+ } /* end if resume_name && !continue_bit */
for (i=0;(i<(int)maxentries) && !finished && !out_of_space ;i++) {
BOOL got_exact_match = False;