Path: utzoo!attcan!uunet!unsvax!jimi!duke.cs.unlv.edu!greg From: greg@duke.cs.unlv.edu (Greg Wohletz) Newsgroups: comp.protocols.tcp-ip.domains Subject: Re: questionable resolver code Message-ID: <1893@jimi.cs.unlv.edu> Date: 13 Aug 90 18:52:42 GMT References: <1891@jimi.cs.unlv.edu> <1990Aug10.083545.1@rogue.llnl.gov> Sender: news@jimi.cs.unlv.edu Reply-To: greg@duke.cs.unlv.edu (Greg Wohletz) Organization: UNLV Computer Science Lines: 35 In article <1990Aug10.083545.1@rogue.llnl.gov>, oberman@rogue.llnl.gov writes: In article <1891@jimi.cs.unlv.edu>, greg@duke.cs.unlv.edu (Greg Wohletz) writes: |> > in the routine res_search is the following line of code: |> > |> > |> > if ((n == 0 || *--cp != '.') && (_res.options & RES_DEFNAMES)) |> > |> > |> > I believe the line should read: |> > |> > if ((n == 0) && (_res.options & RES_DEFNAMES)) |> |> This is "standard behaviour and is, to my understanding, correct. The normal |> operation is to add the default domain information if there is no trailing '.' |> and, if that fails, to try again without adding anything. This is important to |> cases where there are multiple levels of domain structure in an organization. |> Yes, I understand that having that behavior is usefull, but in that case should not the code read: in ((*--cp != '.') && (_res.options & RES_DEFNAMES)) The expresion: (n == 0) || (*--cp != '.') Doesn't seem to accomplish anything. --Greg