#include "cache.h"
+#include "config.h"
#include "tempfile.h"
#include "credential.h"
#include "unix-socket.h"
struct credential_cache_entry {
struct credential item;
- unsigned long expiration;
+ timestamp_t expiration;
};
static struct credential_cache_entry *entries;
static int entries_nr;
e->expiration = 0;
}
-static int check_expirations(void)
+static timestamp_t check_expirations(void)
{
- static unsigned long wait_for_entry_until;
+ static timestamp_t wait_for_entry_until;
int i = 0;
- unsigned long now = time(NULL);
- unsigned long next = (unsigned long)-1;
+ timestamp_t now = time(NULL);
+ timestamp_t next = TIME_MAX;
/*
* Initially give the client 30 seconds to actually contact us
static int serve_cache_loop(int fd)
{
struct pollfd pfd;
- unsigned long wakeup;
+ timestamp_t wakeup;
wakeup = check_expirations();
if (!wakeup)