Thread: [Mixmaster-devel] rev 701 - in trunk/Mix: . Src
Brought to you by:
weaselp
From: <we...@so...> - 2004-01-17 01:51:30
|
Author: weasel Date: 2004-01-17 02:51:22 +0100 (Sat, 17 Jan 2004) New Revision: 701 Modified: trunk/Mix/HISTORY trunk/Mix/Src/chain2.c Log: Also warn if Remailer Reliability Statistics are from the future. Also accept rfc822 style dates Modified: trunk/Mix/HISTORY =================================================================== --- trunk/Mix/HISTORY 2004-01-17 01:33:38 UTC (rev 700) +++ trunk/Mix/HISTORY 2004-01-17 01:51:22 UTC (rev 701) @@ -418,7 +418,8 @@ instead of 0 and maxrem - 1. Mixmaster now uses broken-chain info from stats. I hope this doesn't break any Nym functionality. - Warn if remailer stats are older than a day. + Warn if remailer stats are older than a day or + from the future. Don't send messages to ourselves via the mailsystem but instead place them in the pool as incoming messages so that they will get processed with the Modified: trunk/Mix/Src/chain2.c =================================================================== --- trunk/Mix/Src/chain2.c 2004-01-17 01:33:38 UTC (rev 700) +++ trunk/Mix/Src/chain2.c 2004-01-17 01:51:22 UTC (rev 701) @@ -156,19 +156,24 @@ int generated; int now = time(NULL); char *tmp = line + strlen("Last update:") + 1; - /* For some weird reason, this isn't rfc822 */ - if (strleft(tmp, "Mon") || - strleft(tmp, "Tue") || - strleft(tmp, "Wed") || - strleft(tmp, "Thu") || - strleft(tmp, "Fri") || - strleft(tmp, "Sat") || - strleft(tmp, "Sun")) - tmp += 3; - generated = parsedate(tmp); + generated = parsedate(tmp); + if (generated == -1) { + /* For some weird reason, this isn't rfc822 */ + if (strleft(tmp, "Mon") || + strleft(tmp, "Tue") || + strleft(tmp, "Wed") || + strleft(tmp, "Thu") || + strleft(tmp, "Fri") || + strleft(tmp, "Sat") || + strleft(tmp, "Sun")) + tmp += 3; + generated = parsedate(tmp); + } now = time(NULL); if (generated != -1 && generated < now - SECONDSPERDAY) - errlog(WARNING, "Remailer Reliability Statistics are older than one day.\n"); + errlog(WARNING, "Remailer Reliability Statistics are older than one day (check your clock?).\n"); + if (generated != -1 && generated > now) + errlog(WARNING, "Remailer Reliability Statistics are from the future (check your clock?).\n"); } }; while (fgets(line, sizeof(line), list) != NULL && |