Skip to content

Commit

Permalink
Merge pull request OpenSCAP#217 from jan-cerny/msg_oval_agent
Browse files Browse the repository at this point in the history
Add new debugging messages to OVAL agent.
  • Loading branch information
isimluk committed Nov 20, 2015
2 parents 53c2a65 + 05b0797 commit 0584184
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/OVAL/oval_agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ oval_agent_session_t * oval_agent_new_session(struct oval_definition_model *mode
struct oval_generator *generator;
int ret;

dI("Started new OVAL agent.\n", name);

/* Optimalization */
oval_definition_model_optimize_by_filter_propagation(model);

Expand Down Expand Up @@ -158,7 +160,15 @@ static struct oval_result_system *_oval_agent_get_first_result_system(oval_agent
int oval_agent_eval_definition(oval_agent_session_t *ag_sess, const char *id)
{
int ret;
const char *title = NULL;
struct oval_result_system *rsystem;
struct oval_definition *oval_def;

oval_def = oval_definition_model_get_definition(ag_sess->def_model, id);
if (oval_def != NULL) {
title = oval_definition_get_title(oval_def);
}
dI("Evaluating definition '%s': %s.\n", id, title);

/* probe */
ret = oval_probe_query_definition(ag_sess->psess, id);
Expand Down Expand Up @@ -250,6 +260,7 @@ int oval_agent_eval_system(oval_agent_session_t * ag_sess, agent_reporter cb, vo
char *id;
int ret = 0;

dI("OVAL agent started to evaluate OVAL definitions on your system.\n");
oval_def_it = oval_definition_model_get_definitions(ag_sess->def_model);
while (oval_definition_iterator_has_more(oval_def_it)) {
oval_def = oval_definition_iterator_next(oval_def_it);
Expand Down Expand Up @@ -279,6 +290,7 @@ int oval_agent_eval_system(oval_agent_session_t * ag_sess, agent_reporter cb, vo

cleanup:
oval_definition_iterator_free(oval_def_it);
dI("OVAL agent finished evaluation.\n");
return ret;
}

Expand Down

0 comments on commit 0584184

Please sign in to comment.