Commit 878f8af7 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(sync_part): Use current_time instead of calling time().

(init_cache): Likewise.
parent e3f7496d
/*
* $Id: simple-cache.c,v 0.75 1999/05/13 11:45:37 ceder Exp $
* $Id: simple-cache.c,v 0.76 1999/05/16 21:47:08 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -40,7 +40,7 @@
#endif
static const char *
rcsid = "$Id: simple-cache.c,v 0.75 1999/05/13 11:45:37 ceder Exp $";
rcsid = "$Id: simple-cache.c,v 0.76 1999/05/16 21:47:08 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -91,6 +91,7 @@ USE(rcsid);
#include "admin.h"
#include "unused.h"
#include "local-to-global.h"
#include "server-time.h"
/*
* Possible improvements: +++
......@@ -2084,7 +2085,7 @@ sync_part(void)
if ( last_sync_start == NO_TIME )
{
last_sync_start = time(NULL);
last_sync_start = current_time;
sync_state = sync_idle;
}
......@@ -2118,7 +2119,8 @@ sync_part(void)
return TRUE;
}
if (ldifftime(time(NULL), last_sync_start) < 60 * param.sync_interval)
if (ldifftime(current_time,
last_sync_start) < 60 * param.sync_interval)
{
#ifdef LOGACCESSES
syncing_or_saving = 0;
......@@ -2126,13 +2128,13 @@ sync_part(void)
return TRUE;
}
last_sync_start = time(NULL);
last_sync_start = current_time;
pre_sync();
break;
case sync_wait:
if (ldifftime(time(NULL), last_sync_start)
if (ldifftime(current_time, last_sync_start)
< 60*param.sync_retry_interval)
{
#ifdef LOGACCESSES
......@@ -2141,7 +2143,7 @@ sync_part(void)
return TRUE;
}
last_sync_start = time(NULL);
last_sync_start = current_time;
pre_sync();
break;
......@@ -2226,7 +2228,7 @@ init_cache(void)
}
#endif
LOGACC(lt_restart, time(NULL));
LOGACC(lt_restart, current_time);
for (i = 0; i < param.max_conf; i++)
small_conf_arr[i] = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment