...
|
...
|
@@ -819,6 +819,10 @@ void cache_add(unsigned char *md5, size_t size, cli_ctx *ctx) {
|
819
|
819
|
level = (*ctx->fmap && (*ctx->fmap)->dont_cache_flag) ? ctx->recursion : 0;
|
820
|
820
|
if (ctx->found_possibly_unwanted && (level || !ctx->recursion))
|
821
|
821
|
return;
|
|
822
|
+ if (SCAN_ALL && (ctx->num_viruses > 0)) {
|
|
823
|
+ cli_dbgmsg("cache_add: alert found within same topfile, skipping cache\n");
|
|
824
|
+ return;
|
|
825
|
+ }
|
822
|
826
|
c = &ctx->engine->cache[key];
|
823
|
827
|
if(pthread_mutex_lock(&c->mutex)) {
|
824
|
828
|
cli_errmsg("cli_add: mutex lock fail\n");
|