]> code.citadel.org Git - citadel.git/commitdiff
* Quick fix to 'stats' utility to purge records with bogus timestamps
authorArt Cancro <ajc@citadel.org>
Fri, 31 Mar 2000 04:31:02 +0000 (04:31 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 31 Mar 2000 04:31:02 +0000 (04:31 +0000)
citadel/ChangeLog
citadel/stats.c

index 1bad0ff543b26175a9d2363f524ffcf910af821a..b0443f17e2a20e8dc87d1ed6b5f6227b34180f0c 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 570.10  2000/03/31 04:31:02  ajc
+ * Quick fix to 'stats' utility to purge records with bogus timestamps
+
  Revision 570.9  2000/03/31 02:10:52  ajc
  * Caved in to pressure and enabled <R>eply in public rooms.
 
@@ -1801,3 +1804,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Initial CVS import 
+
index 7eba60ffcc0b7ccc3c7995ec84676e86a63d1424..aaf4af14193a6a851fe9456be17584d1b994191f 100644 (file)
@@ -86,7 +86,7 @@ void progress(long int curr, long int max)
 
 int main(int argc, char **argv)
 {
-       time_t LogTime;
+       time_t LogTime, now;
        unsigned int LogType;
        char LogName[256];
        int a, b, lowest;
@@ -124,6 +124,7 @@ int main(int argc, char **argv)
                       "........................................................................");
 
        get_config();
+       time(&now);
 
        if (pc_only)
                goto PC_ONLY_HERE;
@@ -162,7 +163,8 @@ int main(int argc, char **argv)
                        LogType = atol(strtok(NULL, "|"));
                        strcpy(LogName, strtok(NULL, "|"));
 
-                       if (LogType != 0) {
+                       if ( (LogType != 0) && (LogTime > 100L)
+                          && (LogTime <= now) ) {
                                if ((LogTime < from) || (from == 0L))
                                        from = LogTime;
                                if ((LogTime > to) || (to == 0L))