r5840: Fix findfirst/findnext with protocol level < NT1.
authorJeremy Allison <jra@samba.org>
Thu, 17 Mar 2005 00:37:39 +0000 (00:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:04 +0000 (10:56 -0500)
Jeremy.

source/libsmb/clitrans.c

index 3f1afa75d69e01f4cb63ce66ccd597259306d908..27da63ccdad53659cd7752e53c49288462da3275 100644 (file)
@@ -195,11 +195,12 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans,
        /*
         * An NT RPC pipe call can return ERRDOS, ERRmoredata
         * to a trans call. This is not an error and should not
-        * be treated as such.
+        * be treated as such. Note that STATUS_NO_MORE_FILES is
+        * returned when a trans2 findfirst/next finishes.
         */
        status = cli_nt_error(cli);
        
-       if (NT_STATUS_IS_ERR(status)) {
+       if (NT_STATUS_IS_ERR(status) || NT_STATUS_EQUAL(status,STATUS_NO_MORE_FILES)) {
                cli_signing_trans_stop(cli);
                return False;
        }