diff options
author | Jeremy Allison <jra@samba.org> | 2010-12-13 15:22:47 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-12-14 01:09:05 +0100 |
commit | f974e68213177a1309d0fa3bf78221f7cac2127c (patch) | |
tree | 64d9193b241b3503bbc4e4fcb60387e79293f96c /source3/smbd | |
parent | 041428352c36d548de738fbe971a1361e3a5402b (diff) | |
download | samba-f974e68213177a1309d0fa3bf78221f7cac2127c.tar.gz samba-f974e68213177a1309d0fa3bf78221f7cac2127c.tar.bz2 samba-f974e68213177a1309d0fa3bf78221f7cac2127c.zip |
Change crediting so that the credits are returned on the interim async response.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 14 01:09:05 CET 2010 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/smb2_server.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 91e00dc050..8dbf3276c0 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) { |