New xdump updates:
(EF_UPDATES, update_ca): New. (empfile): Add it. (update_time): Move to src/lib/global/updtime.c.
This commit is contained in:
parent
e9cfbdc241
commit
7dd8b8a305
8 changed files with 55 additions and 9 deletions
|
@ -48,8 +48,6 @@
|
|||
#include "prototypes.h"
|
||||
#include "server.h"
|
||||
|
||||
#define UPDATES 16
|
||||
|
||||
/*
|
||||
* Lock to synchronize player threads with the update.
|
||||
* Update takes it exclusive, commands take it shared.
|
||||
|
@ -68,8 +66,6 @@ int update_pending;
|
|||
*/
|
||||
int update_running;
|
||||
|
||||
time_t update_time[UPDATES];
|
||||
|
||||
static time_t update_schedule_anchor;
|
||||
static int update_wanted;
|
||||
|
||||
|
@ -116,7 +112,8 @@ update_get_schedule(void)
|
|||
{
|
||||
time_t now = time(NULL);
|
||||
|
||||
if (read_schedule(schedulefil, update_time, UPDATES,
|
||||
if (read_schedule(schedulefil, update_time,
|
||||
sizeof(update_time) / sizeof(*update_time),
|
||||
now + 30, update_schedule_anchor) < 0) {
|
||||
logerror("No update schedule!");
|
||||
update_time[0] = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue