}
/* Check if the entry has been updated in the meantime */
- if ((n.time - ce->last_update) < (2 * ce->interval))
+ if ((n.time - ce->last_update) < (timeout_g * ce->interval))
{
ce->state = STATE_OKAY;
pthread_mutex_unlock (&cache_lock);
while (c_avl_iterator_next (iter, (void *) &key, (void *) &ce) == 0)
{
/* If entry has not been updated, add to `keys' array */
- if ((now - ce->last_update) >= (2 * ce->interval))
+ if ((now - ce->last_update) >= (timeout_g * ce->interval))
{
char **tmp;
if (ce->meta == NULL)
ce->meta = meta_data_create ();
+ if (ce->meta == NULL)
+ pthread_mutex_unlock (&cache_lock);
+
return (ce->meta);
} /* }}} meta_data_t *uc_get_meta */