diff options
author | Jeremy Allison <jra@samba.org> | 2006-04-15 04:07:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:22 -0500 |
commit | 010c725b36feb1a234dce9f40b95ae5869058698 (patch) | |
tree | 48ab1b420d3ca0e47677c9f88001506c3b61b16b /source3/smbd/service.c | |
parent | a2e2032d080804b4555df8938e53b395e3fe0b7b (diff) | |
download | samba-010c725b36feb1a234dce9f40b95ae5869058698.tar.gz samba-010c725b36feb1a234dce9f40b95ae5869058698.tar.bz2 samba-010c725b36feb1a234dce9f40b95ae5869058698.zip |
r15088: Remove all time() and gettimeofday() calls out of the mainline
packet processing code. Only do these when needed (ie. in the
idle timeout code). We drop an unneccessary global here too.
Jeremy.
(This used to be commit 8272a5ab0605fcf95527143c4f909aa1008e5b94)
Diffstat (limited to 'source3/smbd/service.c')
-rw-r--r-- | source3/smbd/service.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 5c4974329c..ba87d0743d 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -20,7 +20,6 @@ #include "includes.h" -extern struct timeval smb_last_time; extern userdom_struct current_user_info; /**************************************************************************** @@ -140,7 +139,7 @@ BOOL set_current_service(connection_struct *conn, uint16 flags, BOOL do_chdir) return(False); } - conn->lastused = smb_last_time.tv_sec; + conn->lastused_count++; snum = SNUM(conn); @@ -601,7 +600,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, safe_strcpy(conn->client_address, client_addr(), sizeof(conn->client_address)-1); conn->num_files_open = 0; - conn->lastused = time(NULL); + conn->lastused = conn->lastused_count = time(NULL); conn->service = snum; conn->used = True; conn->printer = (strncmp(dev,"LPT",3) == 0); |