Browse code

Double-reload fix.

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

Tomasz Kojm authored on 2003/11/27 08:55:11
Showing 3 changed files
... ...
@@ -1,3 +1,11 @@
1
+Thu Nov 27 00:51:03 CET 2003 (tk)
2
+---------------------------------
3
+  * clamd: also update database timestamps after RELOAD and not only SelfCheck
4
+	   (problem with double reloading reported by Ole Stanstrup
5
+	   <ole*stanstrup.dk> and Alex Pleiner <pleiner*zeitform.de>)
6
+  * examples/ex1.c: initialize the signature counter to 0 (thanks to Rainer
7
+		    Link) [I should read clamdoc.pdf more carefully ;-)]
8
+
1 9
 Wed Nov 26 14:31:49 CET 2003 (tk)
2 10
 ---------------------------------
3 11
   * examples/ex1.c: fixed a compilation warning (thanks to Rainer Link)
... ...
@@ -322,6 +322,8 @@ void *threadwatcher(void *arg)
322 322
 
323 323
 	    logg("Reading databases from %s\n", dbdir);
324 324
 
325
+	    cl_statfree(&dbstat);
326
+	    cl_statinidir(dbdir, &dbstat);
325 327
 	    virnum = 0;
326 328
 	    if((ret = cl_loaddbdir(dbdir, &*thwarg->root, &virnum))) {
327 329
 		logg("!%s\n", cl_strerror(ret));
... ...
@@ -28,7 +28,7 @@
28 28
 
29 29
 int main(int argc, char **argv)
30 30
 {
31
-	int fd, ret, no;
31
+	int fd, ret, no = 0;
32 32
 	unsigned long int size = 0;
33 33
 	long double mb;
34 34
 	char *virname;