chiark / gitweb /
Fix binary compatibility of string conversion of RRs with internl addr tables
[adns.git] / src / event.c
index 8cfaef5353b54af288e674a7d2d0c816e6dfbc0b..81766c5ac48f8d605da5dab8788589e4ec367b4d 100644 (file)
@@ -488,6 +488,7 @@ int adns_processwriteable(adns_state ads, int fd, const struct timeval *now) {
        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);
       }
@@ -623,6 +624,9 @@ xit:
 /* 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 (;;) {