diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-03-18 13:19:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:41 -0500 |
commit | fe0b56ead166377d415b0eaf04ee1af3bdb435de (patch) | |
tree | d29b9b066efb145089247f40f06117ee13a8b3cd /source3/smbd/process.c | |
parent | c0e37a74963ae942ed48431bd2ea353ebad256ff (diff) | |
download | samba-fe0b56ead166377d415b0eaf04ee1af3bdb435de.tar.gz samba-fe0b56ead166377d415b0eaf04ee1af3bdb435de.tar.bz2 samba-fe0b56ead166377d415b0eaf04ee1af3bdb435de.zip |
r21871: Move deadtime processing into an idle event. While there, simplify
conn_idle_all() a bit.
Volker
(This used to be commit 3fc00977a99932b226bdcbc43bbc0ede1bcec26f)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r-- | source3/smbd/process.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 76af8f2054..6497dfa97b 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1328,9 +1328,7 @@ void check_reload(time_t t) static BOOL timeout_processing(int *select_timeout, time_t *last_timeout_processing_time) { - static time_t last_idle_closed_check = 0; time_t t; - BOOL allidle = True; if (smb_read_error == READ_EOF) { DEBUG(3,("timeout_processing: End of file from client (client has disconnected).\n")); @@ -1350,31 +1348,12 @@ static BOOL timeout_processing(int *select_timeout, *last_timeout_processing_time = t = time(NULL); - if(last_idle_closed_check == 0) - last_idle_closed_check = t; - /* become root again if waiting */ change_to_root_user(); /* check if we need to reload services */ check_reload(t); - /* automatic timeout if all connections are closed */ - if (conn_num_open()==0 && (t - last_idle_closed_check) >= IDLE_CLOSED_TIMEOUT) { - DEBUG( 2, ( "Closing idle connection\n" ) ); - return False; - } else { - last_idle_closed_check = t; - } - - /* check for connection timeouts */ - allidle = conn_idle_all(t); - - if (allidle && conn_num_open()>0) { - DEBUG(2,("Closing idle connection 2.\n")); - return False; - } - if(global_machine_password_needs_changing && /* for ADS we need to do a regular ADS password change, not a domain password change */ |