adns__tcp_broken(ads,"write",strerror(errno));
r= 0; goto xit;
} else if (r>0) {
+ assert(r <= ads->tcpsend.used);
ads->tcpsend.used -= r;
memmove(ads->tcpsend.buf,ads->tcpsend.buf+r,ads->tcpsend.used);
}
/* General helpful functions. */
void adns_globalsystemfailure(adns_state ads) {
+ /* Must not be called by adns during actual processing of a
+ * particular query, since it reenters adns. Only safe to call in
+ * situations where it would be safe to call adns_returning. */
adns__consistency(ads,0,cc_entex);
for (;;) {