chiark / gitweb /
src/: Separate context state into parts for the type itself and its parent.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 25 May 2014 15:57:41 +0000 (16:57 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 13 Jun 2014 08:57:41 +0000 (09:57 +0100)
commit0ea82d760348fe9153dfd2adc10335a50f59628b
treecaefde3d64c47104ac8a57b917f76fb20b0174b9
parent382b81f736a471aafd75661b08e795ffc7521f92
src/: Separate context state into parts for the type itself and its parent.

The `qcontext.info' union has two distinct uses.  A PTR query uses it to
store the initial query address, against which it compares the answer to
its child A query.  On the other hand, `pap_hostaddr' uses this space in
each child query it makes, to keep track of where to put the socket
addresses when the answers come back.

These two kinds of uses are incompatible, so split `qcontext.info' into
two pieces: one for the internal use of a query type, and one for the
use of a child query's parent -- and specifically for its completion
callback.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
src/internal.h
src/query.c
src/types.c