| 6 |
details. |
details. |
| 7 |
|
|
| 8 |
Process remailer messages |
Process remailer messages |
| 9 |
$Id: rem.c,v 1.22 2002/08/21 19:28:04 weaselp Exp $ */ |
$Id: rem.c,v 1.23 2002/08/22 06:19:45 weaselp Exp $ */ |
| 10 |
|
|
| 11 |
|
|
| 12 |
#include "mix3.h" |
#include "mix3.h" |
| 498 |
while (fread(&idbuf, 1, sizeof(idlog_t), f) == sizeof(idlog_t)) { |
while (fread(&idbuf, 1, sizeof(idlog_t), f) == sizeof(idlog_t)) { |
| 499 |
fpi+=sizeof(idlog_t); |
fpi+=sizeof(idlog_t); |
| 500 |
then = idbuf.time; |
then = idbuf.time; |
| 501 |
if (now - then < IDEXP) |
if (now - then < IDEXP && |
| 502 |
|
now - then > - SECONDSPERDAY * 180 ) |
| 503 |
|
/* also expire packets that are dated more than half a year in the future. |
| 504 |
|
* That way we get rid of invalid packets introduced by the switch to a |
| 505 |
|
* binary id.log. */ |
| 506 |
{ |
{ |
| 507 |
fseek(f,fpo,SEEK_SET); |
fseek(f,fpo,SEEK_SET); |
| 508 |
fwrite(&idbuf,1,sizeof(idlog_t),f); |
fwrite(&idbuf,1,sizeof(idlog_t),f); |