Browse code

give custom dbs higher priority during update (requested by Prashant)

Tomasz Kojm authored on 2012/05/10 23:14:49
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Thu May 10 15:45:56 CEST 2012 (tk)
2
+----------------------------------
3
+ * freshclam: give custom dbs higher priority during update
4
+
1 5
 Tue May  8 15:31:51 CEST 2012 (acab)
2 6
 ------------------------------------
3 7
  * libclamav: detect read races and abort the scan with an error
... ...
@@ -2194,6 +2194,15 @@ int downloadmanager(const struct optstruct *opts, const char *hostname, unsigned
2194 2194
 
2195 2195
     memset(ipaddr, 0, sizeof(ipaddr));
2196 2196
 
2197
+    /* custom dbs */
2198
+    if((opt = optget(opts, "DatabaseCustomURL"))->enabled) {
2199
+	while(opt) {
2200
+	    if(updatecustomdb(opt->strarg, &signo, opts, localip, logerr) == 0)
2201
+		updated = 1;
2202
+	    opt = opt->nextarg;
2203
+	}
2204
+    }
2205
+
2197 2206
     if((opt = optget(opts, "update-db"))->enabled) {
2198 2207
 	    const char *u_dnsreply;
2199 2208
 	    int u_extra;
... ...
@@ -2324,15 +2333,6 @@ int downloadmanager(const struct optstruct *opts, const char *hostname, unsigned
2324 2324
     mirman_write("mirrors.dat", dbdir, &mdat);
2325 2325
     mirman_free(&mdat);
2326 2326
 
2327
-    /* custom dbs */
2328
-    if((opt = optget(opts, "DatabaseCustomURL"))->enabled) {
2329
-	while(opt) {
2330
-	    if(updatecustomdb(opt->strarg, &signo, opts, localip, logerr) == 0)
2331
-		updated = 1;
2332
-	    opt = opt->nextarg;
2333
-	}
2334
-    }
2335
-
2336 2327
     cli_rmdirs(updtmpdir);
2337 2328
 
2338 2329
     if(checkdbdir() < 0) {