INN commit: trunk/nnrpd (post.c)
INN Commit
rra at isc.org
Tue Sep 28 20:21:26 UTC 2010
Date: Tuesday, September 28, 2010 @ 13:21:26
Author: iulius
Revision: 9130
datebuff was no longer initialized...
Fix commit 9127.
Modified:
trunk/nnrpd/post.c
--------+
post.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Modified: post.c
===================================================================
--- post.c 2010-09-26 16:38:29 UTC (rev 9129)
+++ post.c 2010-09-28 20:21:26 UTC (rev 9130)
@@ -335,6 +335,11 @@
/* Get the current time, used for creating and checking dates. */
now = time(NULL);
+ /* datebuff is used for both Injection-Date: and Date: header fields
+ * so we have to set it now, and it has to be the UTC date. */
+ if (!makedate(-1, false, datebuff, sizeof(datebuff)))
+ return "Can't generate Date: header";
+
/* Do some preliminary fix-ups. */
for (hp = Table; hp < ARRAY_END(Table); hp++) {
if (!hp->CanSet && hp->Value) {
@@ -385,10 +390,7 @@
}
}
- /* Set the Date: header. datebuff is used later for Injection-Date:,
- * so we have to set it, and it has to be the UTC date. */
- if (!makedate(-1, false, datebuff, sizeof(datebuff)))
- return "Can't generate Date: header";
+ /* Set the Date: header. */
if (HDR(HDR__DATE) == NULL) {
if (PERMaccessconf->localtime) {
if (!makedate(-1, true, localdatebuff, sizeof(localdatebuff)))
More information about the inn-committers
mailing list