mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2026-02-07 05:22:03 -05:00
fix the math
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4729 77e5149b-7576-45b1-b177-96237e5ba77b
This commit is contained in:
@@ -556,10 +556,10 @@ int parallel_client_scan(const char *file, int scantype, int *infected, int *err
|
||||
data.data = &cdata;
|
||||
|
||||
ftw = cli_ftw(file, CLI_FTW_STD, maxlevel ? maxlevel : INT_MAX, parallel_callback, &data);
|
||||
*infected += cdata.infected;
|
||||
*errors += cdata.errors;
|
||||
|
||||
if(ftw != CL_SUCCESS && ftw != CL_BREAK) {
|
||||
*infected += cdata.infected;
|
||||
*errors += cdata.errors;
|
||||
close(cdata.sockd);
|
||||
return 1;
|
||||
}
|
||||
@@ -568,6 +568,9 @@ int parallel_client_scan(const char *file, int scantype, int *infected, int *err
|
||||
while(cdata.ids && !dspresult(&cdata));
|
||||
close(cdata.sockd);
|
||||
|
||||
*infected += cdata.infected;
|
||||
*errors += cdata.errors;
|
||||
|
||||
if(cdata.ids) {
|
||||
logg("!Clamd closed connection before scanning all files.\n");
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user