On Fri, 9 Jan 2009, Phil Blundell wrote:
> So, my question: is it actually useful for ares_expand_name() to return
> ARES_BADNAME, or would it make more sense for it to return ARES_BADRESP if
> its input is malformed? As far as I can tell this function is used only to
> parse server responses, so it would seem that an invalid name encountered
> here must always imply a malfunctioning server.
ares_expand_name() is in the API and it doesn't explicitly deal with
responses, thus making it returning ARES_EBADRESP seems odd.
But internally (like in all the ares_parse_*_reply() functions) in c-ares when
ares_expand_name() is used on a response, I think a returned error could very
well be translated to a ARES_EBADRESP to return from the public function that
was called.
-- / daniel.haxx.seReceived on 2009-01-10