[SCM] Samba Shared Repository - branch v3-6-test updated

Jeremy Allison jra at samba.org
Mon Dec 13 16:24:45 MST 2010


The branch, v3-6-test has been updated
       via  1ef50b1 Change crediting so that the credits are returned on the interim async response. (cherry picked from commit 58ebe1de32050fca71059c521f74488cfa5b3729)
      from  a9ee3e2 As we handle missing sendfile() inside lib/sendfile.c, remove the WITH_SENDFILE ifdefs. (cherry picked from commit 605afc631c212fc070ef5bb951f4d80d342f377d)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 1ef50b15da1ca23afc2d3af6abe7f375e57946a1
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Dec 13 15:22:47 2010 -0800

    Change crediting so that the credits are returned on the interim async response.
    (cherry picked from commit 58ebe1de32050fca71059c521f74488cfa5b3729)

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

Summary of changes:
 source3/smbd/smb2_server.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 91e00dc..8dbf327 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -902,9 +902,11 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
 	/* Match W2K8R2... */
 	SCVAL(body, 0x08, 0x21);
 
-	/* Ensure we correctly go through crediting. */
+	/* Ensure we correctly go through crediting. Grant
+	   the credits now, and zero credits on the final
+	   response. */
 	smb2_set_operation_credit(req->sconn,
-			NULL,
+			&req->in.vector[i],
 			&state->vector[1]);
 
 	if (req->do_signing) {
@@ -1443,9 +1445,10 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
 
 	smb2_setup_nbt_length(req->out.vector, req->out.vector_count);
 
-	/* Set credit for this operation. */
+	/* Set credit for this operation (zero credits if this
+	   is a final reply for an async operation). */
 	smb2_set_operation_credit(req->sconn,
-			&req->in.vector[i],
+			req->async ? NULL : &req->in.vector[i],
 			&req->out.vector[i]);
 
 	if (req->do_signing) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list