Lines Matching refs:map
68 has_entry_expired(map_ctrl *map, datum *key) in has_entry_expired() argument
76 if ((map == NULL) || (map->ttl == NULL)) in has_entry_expired()
80 ttl = dbm_fetch(map->ttl, *key); in has_entry_expired()
92 MAP_EXPIRY_KEY, map->map_name); in has_entry_expired()
103 if (has_map_expired(map)) { in has_entry_expired()
105 update_map_if_required(map, FALSE); in has_entry_expired()
120 map->map_name, dbm_error(map->ttl)); in has_entry_expired()
162 has_map_expired(map_ctrl *map) in has_map_expired() argument
171 return (has_entry_expired(map, &key)); in has_map_expired()
189 update_entry_ttl(map_ctrl *map, datum *key, TTL_TYPE type) in update_entry_ttl() argument
199 ttl = get_ttl_value(map, type); in update_entry_ttl()
210 if (0 > dbm_store(map->ttl, *key, expire, DBM_REPLACE)) { in update_entry_ttl()
237 update_map_ttl(map_ctrl *map) in update_map_ttl() argument
248 if (NULL == map->ttl) { in update_map_ttl()
249 map->ttl = dbm_open(map->ttl_path, O_RDWR, 0644); in update_map_ttl()
250 if (NULL == map->ttl) in update_map_ttl()
256 ret = update_entry_ttl(map, &key, TTL_MIN); in update_map_ttl()
260 dbm_close(map->ttl); in update_map_ttl()
261 map->ttl_path = NULL; in update_map_ttl()