summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-09-20 16:16:03 +0200
committerMichael Adam <obnox@samba.org>2012-09-22 10:19:00 +0200
commit603f9bfa4cf7910e1c1cae1a8d0741a6d0874baa (patch)
tree85b925c1f614fc4e52b47af073ede344a1ef5e84 /source3/smbd
parent65a81060093cf9d7c0ebf8d6e160625bdc87baab (diff)
downloadsamba-603f9bfa4cf7910e1c1cae1a8d0741a6d0874baa.tar.gz
samba-603f9bfa4cf7910e1c1cae1a8d0741a6d0874baa.tar.bz2
samba-603f9bfa4cf7910e1c1cae1a8d0741a6d0874baa.zip
s3:smb2_lock: let smbd_smb2_create_cancel() trigger NT_STATUS_CANCELED
Instead of violating the tevent_req layers. metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_create.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 0d9a146b23..e188c9fa5c 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -284,19 +284,6 @@ static void smbd_smb2_request_create_done(struct tevent_req *tsubreq)
NTSTATUS status;
NTSTATUS error; /* transport error */
- if (smb2req->cancelled) {
- uint64_t mid = get_mid_from_smb2req(smb2req);
- DEBUG(10,("smbd_smb2_request_create_done: cancelled mid %llu\n",
- (unsigned long long)mid ));
- error = smbd_smb2_request_error(smb2req, NT_STATUS_CANCELLED);
- if (!NT_STATUS_IS_OK(error)) {
- smbd_server_connection_terminate(smb2req->sconn,
- nt_errstr(error));
- return;
- }
- return;
- }
-
status = smbd_smb2_create_recv(tsubreq,
smb2req,
&out_oplock_level,
@@ -1427,7 +1414,8 @@ static bool smbd_smb2_create_cancel(struct tevent_req *req)
remove_deferred_open_message_smb2_internal(smb2req, mid);
smb2req->cancelled = true;
- tevent_req_done(req);
+ tevent_req_defer_callback(req, smb2req->sconn->ev_ctx);
+ tevent_req_nterror(req, NT_STATUS_CANCELLED);
return true;
}