# HG changeset patch
# User enz
# Date 958146449 -3600
# Node ID 84e32c84666bafc2aa20ff30647f897a817a7d38
# Parent  688bd51704e0d889f5edb8a5193b5d8f2b350e38
[svn] add some intermediate variables for easier debugging
in needsMark(). It seems that thread mode is sometimes not working.

diff -r 688bd51704e0 -r 84e32c84666b ChangeLog
--- a/ChangeLog	Fri May 12 09:20:00 2000 +0100
+++ b/ChangeLog	Fri May 12 16:47:29 2000 +0100
@@ -2,7 +2,11 @@
 NOFFLE ChangeLog
 -------------------------------------------------------------------------------
 
+Fri May 12 17:42:03 CEST 2000  Markus Enzenberger <markus.enzenberger@t-online.de>
 
+ * src/client.c: add some intermediate variables for easier debugging
+   in needsMark(). It seems that thread mode is sometimes not working.
+	
 Fri May 12 10:19:56 CEST 2000  Uwe Hermann <uh1763@bingo-ev.de>
 
  * configure, configure.in: Only add all those compiler-switches
diff -r 688bd51704e0 -r 84e32c84666b src/client.c
--- a/src/client.c	Fri May 12 09:20:00 2000 +0100
+++ b/src/client.c	Fri May 12 16:47:29 2000 +0100
@@ -1,7 +1,7 @@
 /*
   client.c
 
-  $Id: client.c 60 2000-05-09 22:28:38Z uh1763 $
+  $Id: client.c 63 2000-05-12 15:47:29Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -627,15 +627,16 @@
 static Bool
 needsMark( const char *ref )
 {
-    Bool done = FALSE;
+    Bool done = FALSE, interesting;
     char *p;
     Str msgId;
     int stat, len;
     time_t lastAccess, nowTime;
-    double limit;
+    double threadFollowTime, limit, age;
 
     nowTime = time( NULL );
-    limit = Cfg_threadFollowTime() * 24. * 3600.;
+    threadFollowTime = (double)Cfg_threadFollowTime();
+    limit = threadFollowTime * 24. * 3600.;
     while ( ! done )
     {
         p = msgId;
@@ -655,8 +656,9 @@
         {
             stat = Db_stat( msgId );
             lastAccess = Db_lastAccess( msgId );
-            if ( ( stat & DB_INTERESTING )
-                 && difftime( nowTime, lastAccess ) <= limit )
+            interesting = ( stat & DB_INTERESTING );
+            age = difftime( nowTime, lastAccess );
+            if ( interesting && age <= limit )
                 return TRUE;
         }
     }