"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cf-agent/cf-agent.c" between
cfengine-3.12.6.tar.gz and cfengine-3.12.7.tar.gz

About: CFEngine is a configuration management system for configuring and maintaining Unix-like computers (using an own high level policy language). Community version. Community version. LTS (Long Term Support) release.

cf-agent.c  (cfengine-3.12.6):cf-agent.c  (cfengine-3.12.7)
skipping to change at line 321 skipping to change at line 321
PolicyServerRemoveFile(GetWorkDir()); PolicyServerRemoveFile(GetWorkDir());
WriteAmPolicyHubFile(false); WriteAmPolicyHubFile(false);
ret = 1; ret = 1;
} }
EndAudit(ctx, CFA_BACKGROUND); EndAudit(ctx, CFA_BACKGROUND);
Nova_NoteAgentExecutionPerformance(config->input_file, start); Nova_NoteAgentExecutionPerformance(config->input_file, start);
GenericAgentFinalize(ctx, config); GenericAgentFinalize(ctx, config);
StringSetDestroy(SINGLE_COPY_CACHE);
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
xmlCleanupParser(); xmlCleanupParser();
#endif #endif
return ret; return ret;
} }
/*******************************************************************/ /*******************************************************************/
/* Level 1 */ /* Level 1 */
skipping to change at line 843 skipping to change at line 844
{ {
/* Already handled in generic_agent */ /* Already handled in generic_agent */
continue; continue;
} }
VarRef *ref = VarRefParseFromScope(cp->lval, "control_agent"); VarRef *ref = VarRefParseFromScope(cp->lval, "control_agent");
DataType value_type; DataType value_type;
const void *value = EvalContextVariableGet(ctx, ref, &value_type); const void *value = EvalContextVariableGet(ctx, ref, &value_type);
VarRefDestroy(ref); VarRefDestroy(ref);
/* If var not found, or if it's an empty list. */ /* If var not found */
if (value_type == CF_DATA_TYPE_NONE || value == NULL) if (value_type == CF_DATA_TYPE_NONE)
{ {
Log(LOG_LEVEL_ERR, "Unknown lval '%s' in agent control body", cp ->lval); Log(LOG_LEVEL_ERR, "Unknown lval '%s' in agent control body", cp ->lval);
continue; continue;
} }
/* 'files_single_copy => { }' is a perfectly valid case. */
if (StringEqual(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_FSINGLECOPY]
.lval))
{
assert(value_type == CF_DATA_TYPE_STRING_LIST);
SINGLE_COPY_LIST = value;
SINGLE_COPY_CACHE = StringSetNew();
char *rlist_str = RlistToString(SINGLE_COPY_LIST);
Log(LOG_LEVEL_VERBOSE, "Setting file single copy list to: %s", r
list_str);
free(rlist_str);
continue;
}
/* Empty list is not supported for the other constraints/attributes.
*/
if (value == NULL)
{
Log(LOG_LEVEL_ERR,
"Empty list is not a valid value for '%s' attribute in agent
control body",
cp->lval);
continue;
}
if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_MAXCONNECTIONS].l val) == 0) if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_MAXCONNECTIONS].l val) == 0)
{ {
CFA_MAXTHREADS = (int) IntFromString(value); CFA_MAXTHREADS = (int) IntFromString(value);
Log(LOG_LEVEL_VERBOSE, "Setting maxconnections to %d", CFA_MAXTH READS); Log(LOG_LEVEL_VERBOSE, "Setting maxconnections to %d", CFA_MAXTH READS);
continue; continue;
} }
if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_CHECKSUM_ALERT_TI ME].lval) == 0) if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_CHECKSUM_ALERT_TI ME].lval) == 0)
{ {
CF_PERSISTENCE = (int) IntFromString(value); CF_PERSISTENCE = (int) IntFromString(value);
skipping to change at line 986 skipping to change at line 1008
continue; continue;
} }
if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_DEFAULTCOPYTYPE]. lval) == 0) if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_DEFAULTCOPYTYPE]. lval) == 0)
{ {
DEFAULT_COPYTYPE = value; DEFAULT_COPYTYPE = value;
Log(LOG_LEVEL_VERBOSE, "Setting defaultcopytype to '%s'", DEFAUL T_COPYTYPE); Log(LOG_LEVEL_VERBOSE, "Setting defaultcopytype to '%s'", DEFAUL T_COPYTYPE);
continue; continue;
} }
if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_FSINGLECOPY].lval
) == 0)
{
SINGLE_COPY_LIST = value;
Log(LOG_LEVEL_VERBOSE, "Setting file single copy list");
continue;
}
if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_FAUTODEFINE].lval ) == 0) if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_FAUTODEFINE].lval ) == 0)
{ {
SetFileAutoDefineList(value); SetFileAutoDefineList(value);
Log(LOG_LEVEL_VERBOSE, "Setting file auto define list"); Log(LOG_LEVEL_VERBOSE, "Setting file auto define list");
continue; continue;
} }
if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_DRYRUN].lval) == 0) if (strcmp(cp->lval, CFA_CONTROLBODY[AGENT_CONTROL_DRYRUN].lval) == 0)
{ {
DONTDO = BooleanFromString(value); DONTDO = BooleanFromString(value);
 End of changes. 4 change blocks. 
10 lines changed or deleted 28 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)