cfengine/core — pull request #91 by sigurdteigen (2012-07-25 11:34:54+00:00)
Title: Introduce ReportContext for core reporting.h

This is a high impact code change, but there should be no changes to the behavior of the programs.

(Read commit msg). One notable change is that report files are no longer opened and closed in ReadPromises. Rather, a ReportContext is created at the very top level and passed to GenericAgentInitialize and KeepPromises. This is because there are code-paths from KeepPromises that need a ReportContext. Presumably they are not exercised because of global switches (SHOWPROMISES?). It also means that daemons calling InitializeGA and/or GenericAgentInitialize will have their reporting files open for their entire lifecycle.