Remove the compound_related_in_progress state from the smb2 global state.
authorJeremy Allison <jra@samba.org>
Thu, 2 May 2013 21:16:22 +0000 (14:16 -0700)
committerRichard Sharpe <sharpe@samba.org>
Tue, 7 May 2013 15:58:45 +0000 (17:58 +0200)
And also remove the restriction that we can't read a new
request whilst we're in this state.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@samba.org>
source3/smbd/globals.h
source3/smbd/smb2_server.c

index 46baeed204b44ae226b6bcbcae5437002e5b3abe..d618aeaff3e217e3af25cfa71d643847b0d24631 100644 (file)
@@ -794,7 +794,6 @@ struct smbd_server_connection {
                uint32_t max_trans;
                uint32_t max_read;
                uint32_t max_write;
-               bool compound_related_in_progress;
        } smb2;
 
        struct smbXsrv_connection *conn;
index 8f804a6a2e4f43ac1bf86e76edde5fda50d985bf..b031c6d153f42a5d3569af10c06455f58eab3ef7 100644 (file)
@@ -1366,7 +1366,6 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
                         * This is no longer a compound request.
                         */
                        req->compound_related = false;
-                       req->sconn->smb2.compound_related_in_progress = false;
                        outhdr = SMBD_SMB2_OUT_HDR_PTR(req);
                        flags = (IVAL(outhdr, SMB2_HDR_FLAGS) & ~SMB2_HDR_FLAG_CHAINED);
                        SIVAL(outhdr, SMB2_HDR_FLAGS, flags);
@@ -2042,7 +2041,6 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
 
        if (flags & SMB2_HDR_FLAG_CHAINED) {
                req->compound_related = true;
-               req->sconn->smb2.compound_related_in_progress = true;
        }
 
        if (call->need_session) {
@@ -2406,7 +2404,6 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
 
        if (req->compound_related) {
                req->compound_related = false;
-               req->sconn->smb2.compound_related_in_progress = false;
        }
 
        smb2_setup_nbt_length(req->out.vector, req->out.vector_count);
@@ -3161,14 +3158,6 @@ static NTSTATUS smbd_smb2_request_next_incoming(struct smbd_server_connection *s
        size_t cur_send_queue_len;
        struct tevent_req *subreq;
 
-       if (sconn->smb2.compound_related_in_progress) {
-               /*
-                * Can't read another until the related
-                * compound is done.
-                */
-               return NT_STATUS_OK;
-       }
-
        if (tevent_queue_length(sconn->smb2.recv_queue) > 0) {
                /*
                 * if there is already a smbd_smb2_request_read