chiark / gitweb /
+ * bug_if_query_done feature for debugging (SHOULD BE TAKEN OUT FOR RELEASE)
[adns.git] / src / internal.h
index 643b86f00ad18eb0b0b4ab52791bcc8ef33e010f..719a592255c3c0a0f7002b88257bfc73ce5b0845 100644 (file)
@@ -282,6 +282,7 @@ struct adns__state {
   struct query_queue udpw, tcpw, childw, output;
   adns_query forallnext;
   int nextid, udpsocket, tcpsocket;
+  int bug_if_query_done_now;
   vbuf tcpsend, tcprecv;
   int nservers, nsortlist, nsearchlist, searchndots, tcpserver, tcprecv_skip;
   enum adns__tcpstate {
@@ -289,10 +290,10 @@ struct adns__state {
     server_ok, server_broken
   } tcpstate;
   struct timeval tcptimeout;
-  /* This will have tv_sec==0 if it is not valid.
-   * It will always be valid if tcpstate _connecting.
-   * When _ok, it will be nonzero if we are idle
-   * (ie, tcpw queue is empty) and counting down.
+  /* This will have tv_sec==0 if it is not valid.  It will always be
+   * valid if tcpstate _connecting.  When _ok, it will be nonzero if
+   * we are idle (ie, tcpw queue is empty), in which case it is the
+   * absolute time when we will close the connection.
    */
   struct sigaction stdsigpipe;
   sigset_t stdsigmask;