From e7d0f478ee529500461f80f2fd51987c9255d345 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Oct 2010 11:11:56 -0700 Subject: Add deadtime detection for SMB2. Correctly update lastused timestamp across all active tcons. Should fix dfree cache not updating bug. --- source3/smbd/process.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'source3/smbd/process.c') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index ff2b8fc67d..f2aa23e3e0 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2467,21 +2467,9 @@ static bool deadtime_fn(const struct timeval *now, void *private_data) struct smbd_server_connection *sconn = (struct smbd_server_connection *)private_data; - if (sconn->using_smb2) { - /* TODO: implement real idle check */ - if (sconn->smb2.sessions.list) { - return true; - } - DEBUG( 2, ( "Closing idle SMB2 connection\n" ) ); - messaging_send(sconn->msg_ctx, - messaging_server_id(sconn->msg_ctx), - MSG_SHUTDOWN, &data_blob_null); - return false; - } - if ((conn_num_open(sconn) == 0) || (conn_idle_all(sconn, now->tv_sec))) { - DEBUG( 2, ( "Closing idle SMB1 connection\n" ) ); + DEBUG( 2, ( "Closing idle connection\n" ) ); messaging_send(sconn->msg_ctx, messaging_server_id(sconn->msg_ctx), MSG_SHUTDOWN, &data_blob_null); -- cgit