]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove dptr_close() from call_trans2findfirst().
authorJeremy Allison <jra@samba.org>
Wed, 17 Jul 2019 20:53:33 +0000 (13:53 -0700)
committerRalph Boehme <slow@samba.org>
Tue, 6 Aug 2019 14:23:35 +0000 (14:23 +0000)
Now we're handle-based close_file() already does
what is needed to shut down directory enumeration.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/trans2.c

index a7a11ae947b68589c377dc1018cfead19e4fe964..cddcd805578fe3b627200804837fa33358b9b701 100644 (file)
@@ -3076,7 +3076,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
        /* Check if we can close the dirptr */
        if(close_after_first || (finished && close_if_end)) {
                DEBUG(5,("call_trans2findfirst - (2) closing dptr_num %d\n", dptr_num));
-               dptr_close(sconn, &dptr_num);
+               dptr_num = -1;
                close_file(NULL, fsp, NORMAL_CLOSE);
                fsp = NULL;
        }
@@ -3089,7 +3089,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
         */
 
        if(numentries == 0) {
-               dptr_close(sconn, &dptr_num);
+               dptr_num = -1;
                /*
                 * We may have already closed the file in the
                 * close_after_first or finished case above.