Subject: Re: ares_parse_txt_reply's output is not usable for DNS-SD

Re: ares_parse_txt_reply's output is not usable for DNS-SD

From: Patrick Valsecchi <pvalsecc_at_cisco.com>
Date: Mon, 15 Apr 2013 14:57:36 +0200

On 04/15/2013 11:22 AM, Tommie Gannert wrote:
> 2013/4/15 Patrick Valsecchi <pvalsecc_at_cisco.com
> <mailto:pvalsecc_at_cisco.com>>
>
> Hi,
>
> I'm using c-ares for doing DNS-SD. For that, I need to interpret
> TXT records formatted as specified in the DNS-SD spec [1].
> Unfortunately, the ares_parse_txt_reply function just concatenates
> the sub-strings of the TXT record I get into a single string,
> loosing the information of the various key/value pairs contained
> in the TXT record.
>
>
> +1 for fixing this. It was bugging me that c-ares did this, but in my
> case I just changed my records. :\
>
> 2) change ares_parse_txt_reply to return another ares_txt_reply
> node for each sub-string.
>
>
> IMHO, I think this is the right approach. Possibly it's bad changing
> behavior of that public function... But I wonder how many actually use
> the parse_txt_reply() function relying on the concatenation.
>

Daniel,

I'll need your vote on that, I guess. Do you prefer option 1, 2 or nothing?

Thanks
Received on 2013-04-15