Fixed logic bug in timeout processing spotted by Ying Chen <ying@almaden.ibm.com>.
authorJeremy Allison <jra@samba.org>
Fri, 22 Jun 2001 20:56:52 +0000 (20:56 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 22 Jun 2001 20:56:52 +0000 (20:56 +0000)
Jeremy.
(This used to be commit 08c168242364bf4d415f49d134e507a7e234611b)

source3/smbd/process.c

index 72e0fc311aabe1d5e213aae7f21e005c09306aae..dae99ec80e87451c9fb1c02a9fedaa44e1e6616b 100644 (file)
@@ -1254,7 +1254,7 @@ void smbd_process(void)
                
                if ((num_smbs % 200) == 0) {
                        time_t new_check_time = time(NULL);
-                       if(last_timeout_processing_time - new_check_time >= (select_timeout/1000)) {
+                       if(new_check_time - last_timeout_processing_time >= (select_timeout/1000)) {
                                if(!timeout_processing( deadtime, &select_timeout, &last_timeout_processing_time))
                                        return;
                                num_smbs = 0; /* Reset smb counter. */