aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/plugins/imv_os/imv_os_database.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2012-11-07 14:20:47 +0100
committerAndreas Steffen <andreas.steffen@strongswan.org>2012-11-07 14:20:47 +0100
commitf77d425da35a935d44c8d8ddfb048196ee3e806d (patch)
tree50cfbfa9e250af91abb7ba566f375de3521e603b /src/libimcv/plugins/imv_os/imv_os_database.c
parent538c13fe5c4edeca1ffad64e94992806e0c41e98 (diff)
downloadstrongswan-f77d425da35a935d44c8d8ddfb048196ee3e806d.tar.bz2
strongswan-f77d425da35a935d44c8d8ddfb048196ee3e806d.tar.xz
accumulate package counts over multiple attributes
Diffstat (limited to 'src/libimcv/plugins/imv_os/imv_os_database.c')
-rw-r--r--src/libimcv/plugins/imv_os/imv_os_database.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libimcv/plugins/imv_os/imv_os_database.c b/src/libimcv/plugins/imv_os/imv_os_database.c
index 93cd5ec64..1a34b16f9 100644
--- a/src/libimcv/plugins/imv_os/imv_os_database.c
+++ b/src/libimcv/plugins/imv_os/imv_os_database.c
@@ -47,7 +47,7 @@ METHOD(imv_os_database_t, check_packages, status_t,
os_type_t os_type;
size_t os_version_len;
int pid, gid, security;
- int count = 0, count_ok = 0, count_no_match = 0, count_not_found = 0;
+ int count = 0, count_ok = 0, count_no_match = 0;
enumerator_t *e;
status_t status = SUCCESS;
bool found, match;
@@ -113,7 +113,6 @@ METHOD(imv_os_database_t, check_packages, status_t,
DBG2(DBG_IMV, "package '%s' (%.*s) not found",
package, version.len, version.ptr);
}
- count_not_found++;
e->destroy(e);
continue;
}
@@ -162,21 +161,17 @@ METHOD(imv_os_database_t, check_packages, status_t,
{
DBG1(DBG_IMV, "package '%s' (%s) no match", package, release);
count_no_match++;
- status = VERIFY_ERROR;
}
}
else
{
/* package not present in database for this product - skip */
- count_not_found++;
}
free(package);
free(release);
}
free(product);
-
- DBG1(DBG_IMV, "processed %d packages: %d no match, %d ok, %d not found",
- count, count_no_match, count_ok, count_not_found);
+ state->set_count(state, count, count_no_match, count_ok);
return status;
}