Skip to content

Commit

Permalink
CFSTARTTIME should only be modified when starting the process or re-r…
Browse files Browse the repository at this point in the history
…eading policies.
  • Loading branch information
jimis committed May 12, 2015
1 parent 4f9b05b commit e76ab52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 0 additions & 5 deletions cf-serverd/server_common.c
Expand Up @@ -405,11 +405,6 @@ void DoExec(EvalContext *ctx, ServerConnectionState *conn, char *args)
int print = false, i;
FILE *pp;

if ((CFSTARTTIME = time((time_t *) NULL)) == -1)
{
Log(LOG_LEVEL_ERR, "Couldn't read system clock. (time: %s)", GetErrorStr());
}

if (strlen(CFRUNCOMMAND) == 0)
{
Log(LOG_LEVEL_VERBOSE, "cf-serverd exec request: no cfruncommand defined");
Expand Down
6 changes: 4 additions & 2 deletions libpromises/cf3globals.c
Expand Up @@ -94,8 +94,10 @@ HashMethod CF_DEFAULT_DIGEST; /* GLOBAL_C, initialized later */
int CF_DEFAULT_DIGEST_LEN; /* GLOBAL_C, initialized later */

/*
Holds the "now" time captured at the moment of policy load (and in response to
cf-runagent command to cf-serverd?!).
Holds the "now" time captured at the moment of policy (re)load.
TODO: This variable should be internal to timeout.c, not exposed.
It should only be set by SetStartTime() and read by GetStartTime().
Utilized everywhere "now" start time is needed
*/
Expand Down

0 comments on commit e76ab52

Please sign in to comment.