The branch, master has been updated
       via  c798207... Keep track of credits we're giving out. Set initial 
credits to 1 (MS-SMB2 spec required).
      from  ad9050a... s4/drsuapi: Add another set of predefined ATTIDs

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c7982074a7ea85219411311ebf31444ea4c501a5
Author: Jeremy Allison <[email protected]>
Date:   Tue May 18 17:11:54 2010 -0700

    Keep track of credits we're giving out. Set initial credits to 1 (MS-SMB2 
spec required).
    
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/globals.h     |    1 +
 source3/smbd/smb2_server.c |    9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index ad175bc..f6dd36e 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -570,6 +570,7 @@ struct smbd_server_connection {
                        bool blocking_lock_unlock_state;
                } locks;
                struct smbd_smb2_request *requests;
+               uint64_t credits_granted;
        } smb2;
 };
 
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index d8e6ba1..75c818b 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -437,6 +437,10 @@ static NTSTATUS smbd_smb2_request_setup_out(struct 
smbd_smb2_request *req, uint1
                SSVAL(outhdr, SMB2_HDR_OPCODE,
                      SVAL(inhdr, SMB2_HDR_OPCODE));
                SSVAL(outhdr, SMB2_HDR_CREDIT,          creds);
+
+               /* Remember what we gave out. */
+               req->sconn->smb2.credits_granted += creds;
+
                SIVAL(outhdr, SMB2_HDR_FLAGS,
                      IVAL(inhdr, SMB2_HDR_FLAGS) | SMB2_HDR_FLAG_REDIRECT);
                SIVAL(outhdr, SMB2_HDR_NEXT_COMMAND,    next_command_ofs);
@@ -755,6 +759,9 @@ NTSTATUS smbd_smb2_request_pending_queue(struct 
smbd_smb2_request *req,
        SIVAL(hdr, SMB2_HDR_STATUS, NT_STATUS_V(STATUS_PENDING));
        SSVAL(hdr, SMB2_HDR_OPCODE, SVAL(reqhdr, SMB2_HDR_OPCODE));
        SSVAL(hdr, SMB2_HDR_CREDIT, 5);
+
+       req->sconn->smb2.credits_granted += 5;
+
        SIVAL(hdr, SMB2_HDR_FLAGS, flags | SMB2_HDR_FLAG_ASYNC);
        SIVAL(hdr, SMB2_HDR_NEXT_COMMAND, 0);
        SBVAL(hdr, SMB2_HDR_MESSAGE_ID, message_id);
@@ -1909,7 +1916,7 @@ void smbd_smb2_first_negprot(struct 
smbd_server_connection *sconn,
                return;
        }
 
-       status = smbd_smb2_request_setup_out(req, (uint16_t)lp_maxmux());
+       status = smbd_smb2_request_setup_out(req, 1);
        if (!NT_STATUS_IS_OK(status)) {
                smbd_server_connection_terminate(sconn, nt_errstr(status));
                return;


-- 
Samba Shared Repository

Reply via email to