* - RR-type-specific code, and the machinery to call it
*/
/*
- * This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
- * Copyright (C) 2014 Mark Wooding
- * Copyright (C) 1999-2000,2003,2006 Tony Finch
- * Copyright (C) 1991 Massachusetts Institute of Technology
- * (See the file INSTALL for full details.)
+ * This file is part of adns, which is Copyright Ian Jackson
+ * and contributors (see the file INSTALL for full details).
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* settled on.
*/
adns__cancel_children(parent);
- r= gettimeofday(&now, 0); if (r) goto x_gtod;
+ r= adns__gettimeofday(ads,&now); if (r) goto x_gtod;
qf= adns__qf_addr_cname;
if (!(parent->flags & adns_qf_cname_loose)) qf |= adns_qf_cname_forbid;
addr_subqueries(parent, now, qf, child->vb.buf, child->vb.used);
adns__cancel_children(parent);
adns__free_interim(parent, pans->rrs.bytes);
pans->rrs.bytes= 0; pans->nrrs= 0;
- r= gettimeofday(&now, 0); if (r) goto x_gtod;
+ r= adns__gettimeofday(ads,&now); if (r) goto x_gtod;
adns__search_next(ads, parent, now);
return;
}
/* We have our own error handling, because adns__must_gettimeofday
* handles errors by calling adns_globalsystemfailure, which would
* reenter the query processing logic. */
- adns__diag(ads, -1, parent, "gettimeofday failed: %s", strerror(errno));
+ adns__diag(ads, -1, parent, "gettimeofday/clock_gettime failed: %s",
+ strerror(errno));
err= adns_s_systemfail;
goto x_err;
adns_status st;
char buf[20];
int i;
+ size_t addrsz= gsz_addr(0, rrt);
st= csp_domain(vb,rrp->host); if (st) return st;
CSP_ADDSTR(" (");
for (i=0; i<rrp->naddrs; i++) {
CSP_ADDSTR(" ");
- st= csp_addr(vb,&rrp->addrs[i]);
+ st= csp_addr(vb, (const void*)((const char*)rrp->addrs + addrsz*i));
}
CSP_ADDSTR(" )");
} else {