git-svn: trunk@2201
Nigel Horne authored on 2006/08/20 06:39:59... | ... |
@@ -1,3 +1,9 @@ |
1 |
+Sat Aug 19 22:37:28 BST 2006 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * clamav-milter: Use HAVE_CTIME_R_2 for older daily.cvd files - |
|
4 |
+ interim implementation of a patch suggestion by |
|
5 |
+ Mark Pizzolato |
|
6 |
+ |
|
1 | 7 |
Fri Aug 18 15:40:30 BST 2006 (njh) |
2 | 8 |
---------------------------------- |
3 | 9 |
* clamav-milter: Handle load balancing better when one machine of the |
... | ... |
@@ -23,9 +23,9 @@ |
23 | 23 |
* |
24 | 24 |
* For installation instructions see the file INSTALL that came with this file |
25 | 25 |
*/ |
26 |
-static char const rcsid[] = "$Id: clamav-milter.c,v 1.277 2006/08/18 14:40:18 njh Exp $"; |
|
26 |
+static char const rcsid[] = "$Id: clamav-milter.c,v 1.278 2006/08/19 21:35:11 njh Exp $"; |
|
27 | 27 |
|
28 |
-#define CM_VERSION "devel-180806" |
|
28 |
+#define CM_VERSION "devel-190806" |
|
29 | 29 |
|
30 | 30 |
#if HAVE_CONFIG_H |
31 | 31 |
#include "clamav-config.h" |
... | ... |
@@ -5236,9 +5236,16 @@ loadDatabase(void) |
5236 | 5236 |
if(d) { |
5237 | 5237 |
char *ptr; |
5238 | 5238 |
time_t t = d->stime; |
5239 |
+#ifdef HAVE_CTIME_R_2 |
|
5240 |
+ char buf[26]; |
|
5239 | 5241 |
|
5240 | 5242 |
snprintf(clamav_version, VERSION_LENGTH, |
5243 |
+ "ClamAV %s/%d/%s", VERSION, d->version, |
|
5244 |
+ ctime_r(&t, buf)); |
|
5245 |
+#else |
|
5246 |
+ snprintf(clamav_version, VERSION_LENGTH, |
|
5241 | 5247 |
"ClamAV %s/%d/%s", VERSION, d->version, ctime(&t)); |
5248 |
+#endif |
|
5242 | 5249 |
|
5243 | 5250 |
/* Remove ctime's trailing \n */ |
5244 | 5251 |
if((ptr = strchr(clamav_version, '\n')) != NULL) |