Browse code

do not print outdate warning for main.cvd

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@864 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/09/15 05:35:11
Showing 4 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Sep 14 22:32:50 CEST 2004 (tk)
2
+----------------------------------
3
+  * libclamav: do not print outdate warning for main.cvd
4
+
1 5
 Tue Sep 14 13:10:38 BST 2004 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/mbox.c:	FOLLOWURL: include the text of the old HTML 
... ...
@@ -328,7 +328,7 @@ int cl_cvdverify(const char *file)
328 328
     return ret;
329 329
 }
330 330
 
331
-int cli_cvdload(FILE *fd, struct cl_node **root, unsigned int *signo)
331
+int cli_cvdload(FILE *fd, struct cl_node **root, unsigned int *signo, short warn)
332 332
 {
333 333
         char *dir, *tmp, *buffer;
334 334
 	struct cl_cvd cvd;
... ...
@@ -345,7 +345,7 @@ int cli_cvdload(FILE *fd, struct cl_node **root, unsigned int *signo)
345 345
     if((ret = cli_cvdverify(fd, &cvd)))
346 346
 	return ret;
347 347
 
348
-    if(cvd.stime) {
348
+    if(cvd.stime && warn) {
349 349
 	time(&stime);
350 350
 	if((int) stime - cvd.stime > 604800) {
351 351
 	    cli_warnmsg("**************************************************\n");
... ...
@@ -22,7 +22,7 @@
22 22
 #include <stdio.h>
23 23
 #include "clamav.h"
24 24
 
25
-int cli_cvdload(FILE *fd, struct cl_node **root, unsigned int *signo);
25
+int cli_cvdload(FILE *fd, struct cl_node **root, unsigned int *signo, short warn);
26 26
 int cli_untgz(int fd, const char *destdir);
27 27
 
28 28
 #endif
... ...
@@ -658,7 +658,12 @@ int cl_loaddb(const char *filename, struct cl_node **root, unsigned int *signo)
658 658
 	ret = cli_loaddb(fd, root, signo);
659 659
 
660 660
     } else if(cli_strbcasestr(filename, ".cvd")) {
661
-	ret = cli_cvdload(fd, root, signo);
661
+	    int warn = 0;
662
+
663
+	if(!strcmp(filename, "daily.cvd"))
664
+	    warn = 1;
665
+
666
+	ret = cli_cvdload(fd, root, signo, warn);
662 667
 
663 668
     } else if(cli_strbcasestr(filename, ".hdb")) {
664 669
 	ret = cli_loadhdb(fd, root, signo);