char *sitename_fetch(const char *realm)
{
char *sitename = NULL;
+ time_t timeout;
bool ret = False;
const char *query_realm;
char *key;
key = sitename_key(query_realm);
- ret = gencache_get( key, &sitename, NULL );
+ ret = gencache_get( key, &sitename, &timeout );
SAFE_FREE(key);
if ( !ret ) {
DEBUG(5,("sitename_fetch: No stored sitename for %s\n",
int *num_names)
{
char *key, *value;
+ time_t timeout;
/* exit now if null pointers were passed as they're required further */
if (!ip_list || !num_names) {
return False;
}
- if (!gencache_get(key, &value, NULL)) {
+ if (!gencache_get(key, &value, &timeout)) {
DEBUG(5, ("no entry for %s#%02X found.\n", name, name_type));
SAFE_FREE(key);
return False;
{
char *key = NULL;
char *value = NULL;
+ time_t timeout;
if (!gencache_init())
return False;
if (!key)
return False;
- if (!gencache_get(key, &value, NULL)) {
+ if (!gencache_get(key, &value, &timeout)) {
DEBUG(5, ("namecache_status_fetch: no entry for %s found.\n",
key));
SAFE_FREE(key);
char *saf_fetch( const char *domain )
{
char *server = NULL;
+ time_t timeout;
bool ret = False;
char *key = NULL;
key = saf_key( domain );
- ret = gencache_get( key, &server, NULL );
+ ret = gencache_get( key, &server, &timeout );
SAFE_FREE( key );
bool trustdom_cache_fetch(const char* name, DOM_SID* sid)
{
char *key = NULL, *value = NULL;
+ time_t timeout;
/* init the cache */
if (!gencache_init())
if (!key)
return False;
- if (!gencache_get(key, &value, NULL)) {
+ if (!gencache_get(key, &value, &timeout)) {
DEBUG(5, ("no entry for trusted domain %s found.\n", name));
SAFE_FREE(key);
return False;
uint32 trustdom_cache_fetch_timestamp( void )
{
char *value = NULL;
+ time_t timeout;
uint32 timestamp;
/* init the cache */
if (!gencache_init())
return False;
- if (!gencache_get(TDOMTSKEY, &value, NULL)) {
+ if (!gencache_get(TDOMTSKEY, &value, &timeout)) {
DEBUG(5, ("no timestamp for trusted domain cache located.\n"));
SAFE_FREE(value);
return 0;
return False;
}
- if (!gencache_get("foo", &val, NULL)) {
+ if (!gencache_get("foo", &val, &tm)) {
d_printf("%s: gencache_get() failed\n", __location__);
return False;
}
return False;
}
- if (gencache_get("foo", &val, NULL)) {
+ if (gencache_get("foo", &val, &tm)) {
d_printf("%s: gencache_get() on deleted entry "
"succeeded\n", __location__);
return False;