summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-08-01 16:42:59 +0200
committerJeremy Allison <jra@samba.org>2019-08-06 21:49:28 +0000
commitbb81b9a75ad66ad8a78f146d217e74c3bf7cc7f8 (patch)
tree0ee5048aaa589e8b3584c6cf5d94fb17f66e113a
parentaf97381b11572befe35dc0cb32ccce59a3f4beaa (diff)
downloadsamba-bb81b9a75ad66ad8a78f146d217e74c3bf7cc7f8.tar.gz
smbd: Use "req->request_time" in schedule_async_open()
All callers passed that in Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/smbd/open.c14
-rw-r--r--source3/smbd/process.c13
-rw-r--r--source3/smbd/proto.h7
3 files changed, 14 insertions, 20 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 2c9f7e88528..73a23b74f57 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2468,8 +2468,8 @@ static void defer_open(struct share_mode_lock *lck,
exit_server("tevent_req_set_endtime failed");
}
- ok = push_deferred_open_message_smb(req, req->request_time, timeout,
- open_rec->id, open_rec);
+ ok = push_deferred_open_message_smb(
+ req, timeout, open_rec->id, open_rec);
if (!ok) {
TALLOC_FREE(lck);
exit_server("push_deferred_open_message_smb failed");
@@ -2545,11 +2545,7 @@ static void setup_kernel_oplock_poll_open(struct smb_request *req,
open_rec->xconn = req->xconn;
open_rec->mid = req->mid;
- ok = push_deferred_open_message_smb(req,
- req->request_time,
- timeout,
- id,
- open_rec);
+ ok = push_deferred_open_message_smb(req, timeout, id, open_rec);
if (!ok) {
exit_server("push_deferred_open_message_smb failed");
}
@@ -2670,8 +2666,8 @@ static void schedule_async_open(struct smb_request *req)
exit_server("deferred_open_record_create failed");
}
- ok = push_deferred_open_message_smb(req, req->request_time, timeout,
- (struct file_id){0}, open_rec);
+ ok = push_deferred_open_message_smb(
+ req, timeout, (struct file_id){0}, open_rec);
if (!ok) {
exit_server("push_deferred_open_message_smb failed");
}
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 177cb3cc505..c81b1017bb7 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -936,16 +936,15 @@ bool get_deferred_open_message_state(struct smb_request *smbreq,
****************************************************************************/
bool push_deferred_open_message_smb(struct smb_request *req,
- struct timeval request_time,
- struct timeval timeout,
- struct file_id id,
- struct deferred_open_record *open_rec)
+ struct timeval timeout,
+ struct file_id id,
+ struct deferred_open_record *open_rec)
{
struct timeval end_time;
if (req->smb2req) {
return push_deferred_open_message_smb2(req->smb2req,
- request_time,
+ req->request_time,
timeout,
id,
open_rec);
@@ -959,7 +958,7 @@ bool push_deferred_open_message_smb(struct smb_request *req,
"logic error unread_bytes != 0" );
}
- end_time = timeval_sum(&request_time, &timeout);
+ end_time = timeval_sum(&req->request_time, &timeout);
DEBUG(10,("push_deferred_open_message_smb: pushing message "
"len %u mid %llu timeout time [%u.%06u]\n",
@@ -968,7 +967,7 @@ bool push_deferred_open_message_smb(struct smb_request *req,
(unsigned int)end_time.tv_sec,
(unsigned int)end_time.tv_usec));
- return push_queued_message(req, request_time, end_time, open_rec);
+ return push_queued_message(req, req->request_time, end_time, open_rec);
}
static void smbd_sig_term_handler(struct tevent_context *ev,
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index a07bb550430..100805d3253 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -843,10 +843,9 @@ bool get_deferred_open_message_state(struct smb_request *smbreq,
struct timeval *p_request_time,
struct deferred_open_record **open_rec);
bool push_deferred_open_message_smb(struct smb_request *req,
- struct timeval request_time,
- struct timeval timeout,
- struct file_id id,
- struct deferred_open_record *open_rec);
+ struct timeval timeout,
+ struct file_id id,
+ struct deferred_open_record *open_rec);
NTSTATUS allow_new_trans(struct trans_state *list, uint64_t mid);
void reply_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes);
void smb_request_done(struct smb_request *req);