/[pkg-mixmaster]/trunk/Mix/Src/stats.c
ViewVC logotype

Diff of /trunk/Mix/Src/stats.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 64 by rabbi, Fri Jan 18 09:57:05 2002 UTC revision 82 by rabbi, Tue Jul 9 08:02:02 2002 UTC
# Line 6  Line 6 
6     details.     details.
7    
8     Remailer statistics     Remailer statistics
9     $Id: stats.c,v 1.3 2002/01/18 09:57:05 rabbi Exp $ */     $Id: stats.c,v 1.4 2002/07/09 08:02:02 rabbi Exp $ */
10    
11    
12  #include "mix3.h"  #include "mix3.h"
# Line 59  int stats(BUFFER *b) Line 59  int stats(BUFFER *b)
59    int msgd[3][24], msg[3][80];    int msgd[3][24], msg[3][80];
60    int poold[2][24], pool[2][80];    int poold[2][24], pool[2][80];
61    int i, num, type;    int i, num, type;
62      idlog_t idbuf;
63    
64    now = (time(NULL) / (60 * 60) + 1) * 60 * 60;    now = (time(NULL) / (60 * 60) + 1) * 60 * 60;
65    today = (now / SECONDSPERDAY) * SECONDSPERDAY;    today = (now / SECONDSPERDAY) * SECONDSPERDAY;
# Line 107  int stats(BUFFER *b) Line 108  int stats(BUFFER *b)
108      unlock(s);      unlock(s);
109      fclose(s);      fclose(s);
110    }    }
111    f = mix_openfile(IDLOG, "r");    f = mix_openfile(IDLOG, "rb");
112    if (f != NULL) {    if (f != NULL) {
113      while (fscanf(f, "%*s %ld", &then) != EOF) {      while (fread(&idbuf, 1, sizeof(idlog_t), f) == sizeof(idlog_t)) {
114          then = idbuf.time;
115        if (then < updated || now - then < 0)        if (then < updated || now - then < 0)
116          continue;          continue;
117        if (now - then < SECONDSPERDAY)        if (now - then < SECONDSPERDAY)

Legend:
Removed from v.64  
changed lines
  Added in v.82

  ViewVC Help
Powered by ViewVC 1.1.5