Skip to content
  • David Lawrence's avatar
    The ADD_ANCESTOR macro now checks for the required memory, since it is used · ec80744a
    David Lawrence authored
    in a lot of places now.  It _returns_ if it fails to get the necessary memory,
    so any function using it should be returning a dns_result_t.
    
    chain_name moved toward start of file, for inlining by findnode.
    
    move_chain_to_last broke out some functionality of dns_rbtnodechain_last
    (which now calls it), also for the benefit of findnode.
    
    dns_rbtnodechain_init on the chain used by addnode.
    
    All of the new_foundname concatenation gook was removed from findnode,
    which now just sets foundname by using chain_name.
    
    The chain set up by findnode points to the predecessor when the searched
    for name is not found.
    
    nodechain_current was changed to take name, origin and node parameters while
    returning a dns_result_t.  This allows the chain returned by findnode to
    be named.
    
    The nodechain_{first,last,prev} use nodechain_current to set their
    names and origins.  nodechain_next does not need it because it will never
    have to do the "set the origin to '.' and remove '.' from names in the
    root level" bit.  The root level will never be more than one name, and
    everything in the megatree is a successor to that node, so 'next' never
    reaches the root level.
    ec80744a