| 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" |
| 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; |
| 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) |