summaryrefslogtreecommitdiff
path: root/source4/smb_server/tcon.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-26 11:32:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:18 -0500
commit316269a07523a421755158540d2f4e22fa312866 (patch)
treea0569bf07ccae14b213ab9bd63f8a44240427ffe /source4/smb_server/tcon.c
parente095d9e32ac4770ce8da5f96f143c46a1f803309 (diff)
downloadsamba-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/tcon.c')
-rw-r--r--source4/smb_server/tcon.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/smb_server/tcon.c b/source4/smb_server/tcon.c
index 95e42d6537..8b100d11ce 100644
--- a/source4/smb_server/tcon.c
+++ b/source4/smb_server/tcon.c
@@ -58,7 +58,8 @@ NTSTATUS smbsrv_smb2_init_tcons(struct smbsrv_session *smb_sess)
/****************************************************************************
find a tcon given a tid for SMB
****************************************************************************/
-static struct smbsrv_tcon *smbsrv_tcon_find(struct smbsrv_tcons_context *tcons_ctx, uint32_t tid)
+static struct smbsrv_tcon *smbsrv_tcon_find(struct smbsrv_tcons_context *tcons_ctx,
+ uint32_t tid, struct timeval request_time)
{
void *p;
struct smbsrv_tcon *tcon;
@@ -71,19 +72,24 @@ static struct smbsrv_tcon *smbsrv_tcon_find(struct smbsrv_tcons_context *tcons_c
if (!p) return NULL;
tcon = talloc_get_type(p, struct smbsrv_tcon);
+ if (!tcon) return NULL;
+
+ tcon->statistics.last_request_time = request_time;
return tcon;
}
-struct smbsrv_tcon *smbsrv_smb_tcon_find(struct smbsrv_connection *smb_conn, uint32_t tid)
+struct smbsrv_tcon *smbsrv_smb_tcon_find(struct smbsrv_connection *smb_conn,
+ uint32_t tid, struct timeval request_time)
{
- return smbsrv_tcon_find(&smb_conn->smb_tcons, tid);
+ return smbsrv_tcon_find(&smb_conn->smb_tcons, tid, request_time);
}
-struct smbsrv_tcon *smbsrv_smb2_tcon_find(struct smbsrv_session *smb_sess, uint32_t tid)
+struct smbsrv_tcon *smbsrv_smb2_tcon_find(struct smbsrv_session *smb_sess,
+ uint32_t tid, struct timeval request_time)
{
if (!smb_sess) return NULL;
- return smbsrv_tcon_find(&smb_sess->smb2_tcons, tid);
+ return smbsrv_tcon_find(&smb_sess->smb2_tcons, tid, request_time);
}
/*