Lines Matching defs:msg
493 adjust_msg_ttl(struct dns_msg* msg, time_t adjust)
496 if(adjust >= 0 && msg->rep->ttl > adjust)
497 msg->rep->ttl -= adjust;
499 msg->rep->ttl = 0;
500 msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(msg->rep->ttl);
501 msg->rep->serve_expired_ttl = msg->rep->ttl + SERVE_EXPIRED_TTL;
503 for(i=0; i<msg->rep->rrset_count; i++) {
504 packed_rrset_ttl_subtract((struct packed_rrset_data*)msg->
524 set_msg_ttl(struct dns_msg* msg, time_t ttl)
527 msg->rep->ttl = ttl;
528 msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(msg->rep->ttl);
529 msg->rep->serve_expired_ttl = msg->rep->ttl + SERVE_EXPIRED_TTL;
531 for(i=0; i<msg->rep->rrset_count; i++) {
532 packed_rrset_ttl_set((struct packed_rrset_data*)msg->
604 verbose(VERB_ALGO, "cachedb msg adjust by zero");
609 verbose(VERB_ALGO, "cachedb msg expired");
624 verbose(VERB_ALGO, "cachedb msg adjusted down by %d", (int)adjust);
631 * the msg would be considered to be expired, mark the state so a
702 struct dns_msg* msg;
710 msg = dns_cache_lookup(qstate->env, qstate->qinfo.qname,
717 if(!msg && qstate->env->neg_cache &&
721 msg = val_neg_getmsg(qstate->env->neg_cache, &qstate->qinfo,
727 if(!msg)
729 /* this is the returned msg */
731 qstate->return_msg = msg;
1024 log_query_info(VERB_ALGO, "cachedb msg remove", qinfo);