[INN] bug - posting date ?
Russ Allbery
rra at stanford.edu
Tue Jun 27 22:23:06 UTC 2000
Valentin Beck <vb at codeine.org> writes:
> I'm playing with 2.4.0 20000627 prerelease, it's fine, quick & co, but I
> just noticed a bug: on my FreeBSD 4.0 box, posts get a "funny" X-Trace:
> X-Trace: annalynn.codeine.org 962138172 25368 127.0.0.1 (8 Apr 1974
> 16:59:44 GMT)
> Problem seems to come from nnrpd/post.c, line 514. Unfortunately, I
> can't submit some exact problem description or patch, my C knowledge is
> too small ;)
Whoops, my fault. Try this patch.
--- nnrpd/post.c 2000/06/13 06:47:47 1.55
+++ nnrpd/post.c 2000/06/27 22:22:46
@@ -337,6 +337,12 @@
pid_t pid;
BOOL addvirtual = FALSE;
+ /* Various things need Now to be set. */
+ if (GetTimeInfo(&Now) < 0) {
+ sprintf(Error, "Can't get the time, %s", strerror(errno));
+ return Error;
+ }
+
/* Do some preliminary fix-ups. */
for (hp = Table; hp < ENDOF(Table); hp++) {
if (!hp->CanSet && hp->Value) {
@@ -385,10 +391,6 @@
HDR(_date) = datebuff;
}
} else {
- if (GetTimeInfo(&Now) < 0) {
- sprintf(Error, "Can't get the time, %s", strerror(errno));
- return Error;
- }
if ((t = parsedate(HDR(_date), &Now)) == -1)
return "Can't parse \"Date\" header";
if (t > Now.time + DATE_FUZZ)
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the inn-bugs
mailing list