From f9d183f931f021c7b76047766838388cb7686c37 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 2 Aug 2011 17:05:33 +0200 Subject: s3: Pass sconn explicitly to open_was_deferred --- source3/smbd/nttrans.c | 6 +++--- source3/smbd/open.c | 2 +- source3/smbd/process.c | 6 +++--- source3/smbd/proto.h | 2 +- source3/smbd/reply.c | 14 +++++++------- source3/smbd/smb2_create.c | 2 +- source3/smbd/trans2.c | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 9f745f269e..8900ec875f 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -584,7 +584,7 @@ void reply_ntcreate_and_X(struct smb_request *req) &info); /* pinfo */ if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call, no error. */ goto out; } @@ -1159,7 +1159,7 @@ static void call_nt_transact_create(connection_struct *conn, &info); /* pinfo */ if(!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call, no error. */ return; } @@ -1642,7 +1642,7 @@ void reply_ntrename(struct smb_request *req) } if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ goto out; } diff --git a/source3/smbd/open.c b/source3/smbd/open.c index e5496fdd14..61d1a2e3cc 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -794,7 +794,7 @@ static void validate_my_share_entries(struct smbd_server_connection *sconn, } if (is_deferred_open_entry(share_entry) && - !open_was_deferred(share_entry->op_mid)) { + !open_was_deferred(sconn, share_entry->op_mid)) { char *str = talloc_asprintf(talloc_tos(), "Got a deferred entry without a request: " "PANIC: %s\n", diff --git a/source3/smbd/process.c b/source3/smbd/process.c index bb0b85a20e..0160c35621 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -743,12 +743,12 @@ void schedule_deferred_open_message_smb(struct smbd_server_connection *sconn, Return true if this mid is on the deferred queue and was not yet processed. ****************************************************************************/ -bool open_was_deferred(uint64_t mid) +bool open_was_deferred(struct smbd_server_connection *sconn, uint64_t mid) { struct pending_message_list *pml; - if (smbd_server_conn->using_smb2) { - return open_was_deferred_smb2(smbd_server_conn, mid); + if (sconn->using_smb2) { + return open_was_deferred_smb2(sconn, mid); } for (pml = deferred_open_queue; pml; pml = pml->next) { diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 5eced3df9b..49fc8c7b20 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -775,7 +775,7 @@ void remove_deferred_open_message_smb(struct smbd_server_connection *sconn, uint64_t mid); void schedule_deferred_open_message_smb(struct smbd_server_connection *sconn, uint64_t mid); -bool open_was_deferred(uint64_t mid); +bool open_was_deferred(struct smbd_server_connection *sconn, uint64_t mid); bool get_deferred_open_message_state(struct smb_request *smbreq, struct timeval *p_request_time, void **pp_state); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 59ec8f212e..2bc80f4738 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1816,7 +1816,7 @@ void reply_open(struct smb_request *req) &info); /* pinfo */ if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ goto out; } @@ -1993,7 +1993,7 @@ void reply_open_and_X(struct smb_request *req) &smb_action); /* pinfo */ if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ goto out; } @@ -2215,7 +2215,7 @@ void reply_mknew(struct smb_request *req) NULL); /* pinfo */ if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ goto out; } @@ -2347,7 +2347,7 @@ void reply_ctemp(struct smb_request *req) close(tmpfd); if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ goto out; } @@ -2822,7 +2822,7 @@ void reply_unlink(struct smb_request *req) status = unlink_internals(conn, req, dirtype, smb_fname, path_contains_wcard); if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ goto out; } @@ -5663,7 +5663,7 @@ void reply_rmdir(struct smb_request *req) &info); /* pinfo */ if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ goto out; } @@ -6678,7 +6678,7 @@ void reply_mv(struct smb_request *req) attrs, False, src_has_wcard, dest_has_wcard, DELETE_ACCESS); if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ goto out; } diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 7c6b4bc46c..aaa461c503 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -719,7 +719,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, &result, &info); if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(smb1req->mid)) { + if (open_was_deferred(smb1req->sconn, smb1req->mid)) { return req; } tevent_req_nterror(req, status); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 859d2adef4..881dced310 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1138,7 +1138,7 @@ static void call_trans2open(connection_struct *conn, &smb_action); /* psbuf */ if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ goto out; } @@ -8048,7 +8048,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn, ppdata, total_data, &data_return_size); if (!NT_STATUS_IS_OK(status)) { - if (open_was_deferred(req->mid)) { + if (open_was_deferred(req->sconn, req->mid)) { /* We have re-scheduled this call. */ return; } -- cgit