[dovecot-cvs] dovecot/src/util rawlog.c,1.2,1.3

cras at dovecot.org cras at dovecot.org
Mon Aug 23 17:15:11 EEST 2004


Update of /home/cvs/dovecot/src/util
In directory talvi:/tmp/cvs-serv14652

Modified Files:
	rawlog.c 
Log Message:
Rawlog filename was always with date 01.01.1970.



Index: rawlog.c
===================================================================
RCS file: /home/cvs/dovecot/src/util/rawlog.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rawlog.c	24 Aug 2003 09:35:19 -0000	1.2
+++ rawlog.c	23 Aug 2004 14:15:09 -0000	1.3
@@ -93,6 +93,7 @@
 	struct stat st;
 	int sfd[2];
 	pid_t pid, parent_pid;
+	time_t now;
 
 	home = getenv("HOME");
 	if (home == NULL)
@@ -130,7 +131,8 @@
 	restrict_access_by_env(TRUE);
 
 	/* open the files after dropping privileges */
-	tm = localtime(&ioloop_time);
+	now = time(NULL);
+	tm = localtime(&now);
 	if (strftime(timestamp, sizeof(timestamp), "%Y%m%d-%H%M%S", tm) <= 0)
 		i_fatal("strftime() failed");
 



More information about the dovecot-cvs mailing list