[ldns-users] rrlist issue

Miek Gieben miek at miek.nl
Mon Jul 13 17:52:41 UTC 2009


[ Quoting Henri Asseily in "[ldns-users] rrlist issue"... ]
> In ldns 1.5.x I have an issue with an exception being caught if there's 
> no data in the rrlist and I try to count its rrs. My code needs to do:
>
> @try {
> 	ldns_rr_list_rr_count(rrlist);
> }
> @catch (NSException * e) {
> 	// Exception is caught if there's no data in the rrlist,
> 	// i.e. if there are no records.
> 	// TODO: See in ldns rr.c source why ldns_rr_list_rr_count() fails and 
> doesn't return 0
> 	// In the meantime, disable the error
> }
>
> Haven't had time yet to check 1.6, sorry.

If you use a valid ldns_rr_list* it (ldns_rr_list_rr_count) just returns _rr_count.
It could be that it is not initialized properly?

grtz,

--
 --Miek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20090713/dd4e5f54/attachment.bin>


More information about the ldns-users mailing list