Lines Matching refs:map

58  * INPUTS:	Map control structure for an open map
67 has_entry_expired(map_ctrl *map, datum *key)
75 if ((map == NULL) || (map->ttl == NULL))
79 ttl = dbm_fetch(map->ttl, *key);
83 * If we failed to get a map expiry key, which must always be
85 * the map.
90 "for map %s. Will attempt to recreate map",
91 MAP_EXPIRY_KEY, map->map_name);
98 * service other than NIS. Check if the entire map has expired.
102 if (has_map_expired(map)) {
103 /* Kick of a map update */
104 update_map_if_required(map, FALSE);
118 "Invalid TTL key in map %s. error %d",
119 map->map_name, dbm_error(map->ttl));
152 * DESCRIPTION: Determines if an entire map has expire
154 * INPUTS: Map control structure for an open map
161 has_map_expired(map_ctrl *map)
169 /* Call has_entry_expired() with magic map expiry key */
170 return (has_entry_expired(map, &key));
176 * DESCRIPTION: Updates the TTL for one map entry
178 * INPUTS: Map control structure for an open map
188 update_entry_ttl(map_ctrl *map, datum *key, TTL_TYPE type)
198 ttl = get_ttl_value(map, type);
209 if (0 > dbm_store(map->ttl, *key, expire, DBM_REPLACE)) {
221 * DESCRIPTION: Updates the TTL for entire map. This can be called either with
222 * the map open (map_ctrl DBM pointer set up) or the map closed
224 * when we have just created a new map.
226 * This function must open the TTL map but, in either case, must
229 * INPUTS: Map control structure for an open map
236 update_map_ttl(map_ctrl *map)
247 if (NULL == map->ttl) {
248 map->ttl = dbm_open(map->ttl_path, O_RDWR, 0644);
249 if (NULL == map->ttl)
254 /* Call update_entry_ttl() with magic map expiry key */
255 ret = update_entry_ttl(map, &key, TTL_MIN);
259 dbm_close(map->ttl);
260 map->ttl_path = NULL;