auth-cache.c revision 4e21cef121b8ad20439ccbcb4e9072c208f08611
/* Copyright (C) 2004 Timo Sirainen */
#include "common.h"
#include "lib-signals.h"
#include "hash.h"
#include "str.h"
#include "strescape.h"
#include "var-expand.h"
#include "mech.h"
#include "auth-cache.h"
#include <time.h>
struct cache_node {
};
struct auth_cache {
struct hash_table *hash;
unsigned int ttl_secs;
unsigned int hup_count;
};
char *auth_cache_parse_key(const char *query)
{
char key_seen[256];
query++;
/* @UNSAFE */
}
}
}
return str_free_without_data(str);
}
static void
{
else {
/* unlinking tail */
}
else {
/* unlinking head */
}
}
static void
{
else
}
static void
{
}
{
struct auth_cache *cache;
return cache;
}
{
}
{
}
const struct auth_request *request,
const char *key)
{
struct cache_node *node;
/* SIGHUP received - clear cache */
i_info("SIGHUP received, clearing cache");
return NULL;
}
return NULL;
/* TTL expired, destroy */
return NULL;
}
/* move to head */
}
}
const struct auth_request *request,
{
struct cache_node *node;
/* TTL expired, destroy */
}
/* make sure we have enough space */
/* @UNSAFE */
}