diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-03-26 11:32:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:59:18 -0500 |
commit | 316269a07523a421755158540d2f4e22fa312866 (patch) | |
tree | a0569bf07ccae14b213ab9bd63f8a44240427ffe /source4/smb_server/smb2 | |
parent | e095d9e32ac4770ce8da5f96f143c46a1f803309 (diff) | |
download | samba-316269a07523a421755158540d2f4e22fa312866.tar.gz samba-316269a07523a421755158540d2f4e22fa312866.tar.bz2 samba-316269a07523a421755158540d2f4e22fa312866.zip |
r14739: keep the last request time for the smbsrv_connection,
smbsrv_session and smbsrv_tcon for management tools
metze
(This used to be commit 2c87f210e9e68de42dc45ca6532f3f33f4b6ce95)
Diffstat (limited to 'source4/smb_server/smb2')
-rw-r--r-- | source4/smb_server/smb2/receive.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c index ef67d29c51..6781b6ce65 100644 --- a/source4/smb_server/smb2/receive.c +++ b/source4/smb_server/smb2/receive.c @@ -128,8 +128,8 @@ static NTSTATUS smb2srv_reply(struct smb2srv_request *req) tid = IVAL(req->in.hdr, SMB2_HDR_TID); uid = BVAL(req->in.hdr, SMB2_HDR_UID); - req->session = smbsrv_session_find(req->smb_conn, uid); - req->tcon = smbsrv_smb2_tcon_find(req->session, tid); + req->session = smbsrv_session_find(req->smb_conn, uid, req->request_time); + req->tcon = smbsrv_smb2_tcon_find(req->session, tid, req->request_time); errno = 0; @@ -241,10 +241,13 @@ NTSTATUS smbsrv_recv_smb2_request(void *private, DATA_BLOB blob) { struct smbsrv_connection *smb_conn = talloc_get_type(private, struct smbsrv_connection); struct smb2srv_request *req; + struct timeval cur_time = timeval_current(); uint32_t protocol_version; uint16_t buffer_code; uint32_t dynamic_size; + smb_conn->statistics.last_request_time = cur_time; + /* see if its a special NBT packet */ if (CVAL(blob.data,0) != 0) { DEBUG(2,("Special NBT packet on SMB2 connection")); @@ -271,7 +274,7 @@ NTSTATUS smbsrv_recv_smb2_request(void *private, DATA_BLOB blob) req->in.buffer = talloc_steal(req, blob.data); req->in.size = blob.length; - req->request_time = timeval_current(); + req->request_time = cur_time; req->in.allocated = req->in.size; req->in.hdr = req->in.buffer+ NBT_HDR_SIZE; |