*
* 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
*
* 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
int serv, adns_query qu, const char *fmt, va_list al) {
const char *bef, *aft;
vbuf vb;
int serv, adns_query qu, const char *fmt, va_list al) {
const char *bef, *aft;
vbuf vb;
- fprintf(stderr,"%sQNAME=%s, QTYPE=%s",
+ fprintf(ads->diagfile,"%sQNAME=%s, QTYPE=%s",
bef,
adns__diag_domain(qu->ads,-1,0, &vb,
qu->query_dgram,qu->query_dglen,DNS_HDRSIZE),
qu->typei ? qu->typei->rrtname : "<unknown>");
if (qu->typei && qu->typei->fmtname)
bef,
adns__diag_domain(qu->ads,-1,0, &vb,
qu->query_dgram,qu->query_dglen,DNS_HDRSIZE),
qu->typei ? qu->typei->rrtname : "<unknown>");
if (qu->typei && qu->typei->fmtname)
- fprintf(stderr,"%sNS=%s",bef,inet_ntoa(ads->servers[serv].addr));
+ fprintf(ads->diagfile,"%sNS=%s",bef,inet_ntoa(ads->servers[serv].addr));
}
void adns__debug(adns_state ads, int serv, adns_query qu, const char *fmt, ...) {
}
void adns__debug(adns_state ads, int serv, adns_query qu, const char *fmt, ...) {
}
void adns__isort(void *array, int nobjs, int sz, void *tempbuf,
}
void adns__isort(void *array, int nobjs, int sz, void *tempbuf,
if (place != i) {
memcpy(tempbuf, data + i*sz, sz);
memmove(data + (place+1)*sz, data + place*sz, (i-place)*sz);
if (place != i) {
memcpy(tempbuf, data + i*sz, sz);
memmove(data + (place+1)*sz, data + place*sz, (i-place)*sz);