[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri Apr 23 16:36:33 MDT 2010


The branch, master has been updated
       via  2472731... When sending the initial async response, this is never part of a chain.
       via  0e6f4ed... Don't free the entire tevent_req on cancel, only the part we need (the immediate event).
      from  328ca04... libwbclient: Test WBC_CHANGE_PASSWORD_LEVEL_RESPONSE

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


- Log -----------------------------------------------------------------
commit 247273196ff8035ef16805f04fe7c32ef9a8be50
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Apr 23 15:35:34 2010 -0700

    When sending the initial async response, this is never part of a chain.
    
    Get the reply flags correct.
    
    Jeremy.

commit 0e6f4ed7035a3536c94d248b2ca9f890b0f07fb3
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Apr 23 15:34:58 2010 -0700

    Don't free the entire tevent_req on cancel, only the part we need (the immediate event).
    
    Jeremy.

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

Summary of changes:
 source3/smbd/smb2_notify.c |   21 ++++++++++++---------
 source3/smbd/smb2_server.c |    2 +-
 2 files changed, 13 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_notify.c b/source3/smbd/smb2_notify.c
index 460e629..44b6c38 100644
--- a/source3/smbd/smb2_notify.c
+++ b/source3/smbd/smb2_notify.c
@@ -22,6 +22,14 @@
 #include "smbd/globals.h"
 #include "../libcli/smb/smb_common.h"
 
+struct smbd_smb2_notify_state {
+	struct smbd_smb2_request *smb2req;
+	struct smb_request *smbreq;
+	struct tevent_immediate *im;
+	NTSTATUS status;
+	DATA_BLOB out_output_buffer;
+};
+
 static struct tevent_req *smbd_smb2_notify_send(TALLOC_CTX *mem_ctx,
 						struct tevent_context *ev,
 						struct smbd_smb2_request *smb2req,
@@ -109,8 +117,11 @@ static void smbd_smb2_request_notify_done(struct tevent_req *subreq)
 	NTSTATUS error; /* transport error */
 
 	if (req->cancelled) {
+		struct smbd_smb2_notify_state *state = tevent_req_data(subreq,
+					       struct smbd_smb2_notify_state);
 		const uint8_t *inhdr = (const uint8_t *)req->in.vector[i].iov_base;
 		uint64_t mid = BVAL(inhdr, SMB2_HDR_MESSAGE_ID);
+
 		DEBUG(10,("smbd_smb2_request_notify_done: cancelled mid %llu\n",
 			(unsigned long long)mid ));
 		error = smbd_smb2_request_error(req, NT_STATUS_CANCELLED);
@@ -119,7 +130,7 @@ static void smbd_smb2_request_notify_done(struct tevent_req *subreq)
 				nt_errstr(error));
 			return;
 		}
-		TALLOC_FREE(subreq);
+		TALLOC_FREE(state->im);
 		return;
 	}
 
@@ -168,14 +179,6 @@ static void smbd_smb2_request_notify_done(struct tevent_req *subreq)
 	}
 }
 
-struct smbd_smb2_notify_state {
-	struct smbd_smb2_request *smb2req;
-	struct smb_request *smbreq;
-	struct tevent_immediate *im;
-	NTSTATUS status;
-	DATA_BLOB out_output_buffer;
-};
-
 static void smbd_smb2_notify_reply(struct smb_request *smbreq,
 				   NTSTATUS error_code,
 				   uint8_t *buf, size_t len);
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index c838954..04cace8 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -713,7 +713,7 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
 	}
 
 	reqhdr = (uint8_t *)req->out.vector[i].iov_base;
-	flags = IVAL(reqhdr, SMB2_HDR_FLAGS);
+	flags = (IVAL(reqhdr, SMB2_HDR_FLAGS) & ~SMB2_HDR_FLAG_CHAINED);
 	message_id = BVAL(reqhdr, SMB2_HDR_MESSAGE_ID);
 	async_id = message_id; /* keep it simple for now... */
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list