Lines Matching refs:entry
140 const ares__qcache_entry_t *entry = ares__slist_node_val(node);
141 if (entry->expire_ts > now->tv_sec) {
145 ares__htable_strvp_remove(cache->cache, entry->key);
186 ares__qcache_entry_t *entry = arg;
187 if (entry == NULL) {
191 ares_free(entry->key);
192 ares_dns_record_destroy(entry->dnsrec);
193 ares_free(entry);
315 ares__qcache_entry_t *entry;
350 entry = ares_malloc_zero(sizeof(*entry));
351 if (entry == NULL) {
355 entry->dnsrec = dnsrec;
356 entry->expire_ts = now->tv_sec + (time_t)ttl;
357 entry->insert_ts = now->tv_sec;
363 entry->key = ares__qcache_calc_key_frombuf(qbuf, qlen);
364 if (entry->key == NULL) {
368 if (!ares__htable_strvp_insert(qcache->cache, entry->key, entry)) {
372 if (ares__slist_insert(qcache->expire, entry) == NULL) {
379 if (entry != NULL && entry->key != NULL) {
380 ares__htable_strvp_remove(qcache->cache, entry->key);
381 ares_free(entry->key);
382 ares_free(entry);
393 ares__qcache_entry_t *entry;
408 entry = ares__htable_strvp_get_direct(qcache->cache, key);
409 if (entry == NULL) {
415 entry->dnsrec, (unsigned int)(now->tv_sec - entry->insert_ts));
417 status = ares_dns_write(entry->dnsrec, buf, buf_len);