Browse code

freshclam/manager.c: don't call cli_bytecode_prepare() when Bytecode is disabled in freshclam.conf (bb#2149)

Tomasz Kojm authored on 2010/08/02 23:09:24
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Mon Aug  2 16:08:04 CEST 2010 (tk)
2
+----------------------------------
3
+ * freshclam/manager.c: don't call cli_bytecode_prepare() when Bytecode is
4
+			disabled in freshclam.conf (bb#2149)
5
+
1 6
 Mon Aug  2 15:37:19 CEST 2010 (tk)
2 7
 ----------------------------------
3 8
  * libclamav/matcher: make icon sigs work with bytecode (bb#2137)
... ...
@@ -1768,7 +1768,7 @@ static int updatedb(const char *dbname, const char *hostname, char *ip, int *sig
1768 1768
 	    cl_engine_free(engine);
1769 1769
 	    return 55;
1770 1770
 	}
1771
-	if((ret = cli_bytecode_prepare(engine, &engine->bcs, engine->dconf->bytecode/*FIXME: dconf has no sense here*/))) {
1771
+	if(optget(opts, "Bytecode")->enabled && (ret = cli_bytecode_prepare(engine, &engine->bcs, engine->dconf->bytecode/*FIXME: dconf has no sense here*/))) {
1772 1772
 	    logg("!Failed to compile/load bytecode: %s\n", cl_strerror(ret));
1773 1773
 	    unlink(newfile);
1774 1774
 	    free(newfile);