Browse code

store db options in cl_engine for further reference

git-svn: trunk@2513

Tomasz Kojm authored on 2006/11/23 09:07:58
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Thu Nov 23 01:05:30 CET 2006 (tk)
2
+---------------------------------
3
+  * libclamav: store db options in cl_engine for further reference,
4
+	       requested by Edvin (see bb#147)
5
+
1 6
 Mon Nov 20 00:58:57 CET 2006 (tk)
2 7
 ---------------------------------
3 8
   * libclamav: cache target file info in pattern matchers
... ...
@@ -162,6 +162,7 @@ struct cl_engine {
162 162
     unsigned int refcount; /* reference counter */
163 163
     unsigned short ncore;
164 164
     unsigned short sdb;
165
+    unsigned int dboptions;
165 166
 
166 167
     /* Roots table */
167 168
     struct cli_matcher **root;
... ...
@@ -477,7 +477,10 @@ int cli_parse_add(struct cli_matcher *root, const char *virname, const char *hex
477 477
 
478 478
 static int cli_initengine(struct cl_engine **engine, unsigned int options)
479 479
 {
480
-    int rc;
480
+#ifdef CL_EXPERIMENTAL
481
+	int rc;
482
+#endif
483
+
481 484
 
482 485
     if(!*engine) {
483 486
 	cli_dbgmsg("Initializing the engine structure\n");
... ...
@@ -1321,6 +1324,8 @@ int cl_load(const char *path, struct cl_engine **engine, unsigned int *signo, un
1321 1321
 	return ret;
1322 1322
     }
1323 1323
 
1324
+    (*engine)->dboptions = options;
1325
+
1324 1326
     switch(sb.st_mode & S_IFMT) {
1325 1327
 	case S_IFREG: 
1326 1328
 	    return cli_load(path, engine, signo, options);