Lines Matching defs:entry
72 static void cache_free(struct cache_entry *entry);
87 * result is cached. The cached entry is valid only
181 * Free a cache entry and all entries
186 cache_free(struct cache_entry *entry)
191 for (ce = entry; ce; ce = next) {
206 * for an entry with a matching hostname and group
213 * If we find an expired entry then blow away the entry
230 * If we find a stale entry, there can't
233 * and delete the stale entry and all following
281 * Put a new entry in the cache chain by
288 struct cache_entry *entry;
291 entry = malloc(sizeof (*entry));
292 if (entry == NULL)
295 (void) memset((caddr_t)entry, 0, sizeof (*entry));
296 entry->cache_host = strdup(host);
297 if (entry->cache_host == NULL) {
298 cache_free(entry);
302 entry->cache_time = time(NULL) + VALID_TIME;
303 entry->cache_belong = belong;
304 entry->cache_grl = malloc(grc * sizeof (char *));
305 if (entry->cache_grl == NULL) {
306 cache_free(entry);
311 entry->cache_grl[i] = strdup(grl[i]);
312 if (entry->cache_grl[i] == NULL) {
313 entry->cache_grc = i;
314 cache_free(entry);
319 entry->cache_grc = grc;
322 entry->cache_next = cache_head;
323 cache_head = entry;