From: Mark Andrews Date: Sun, 28 Aug 2011 09:10:41 +0000 (+0000) Subject: report if dns_rdata{class,type}_totext failed X-Git-Tag: v9.9.0a2~1^2~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6b0ccf76ab6565c2f4f071932f3b74fb41e23a9;p=thirdparty%2Fbind9.git report if dns_rdata{class,type}_totext failed --- diff --git a/bin/tests/rdata_test.c b/bin/tests/rdata_test.c index bf79b9d1c2b..ff26d3d2a9e 100644 --- a/bin/tests/rdata_test.c +++ b/bin/tests/rdata_test.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata_test.c,v 1.51 2011/08/16 03:00:02 marka Exp $ */ +/* $Id: rdata_test.c,v 1.52 2011/08/28 09:10:41 marka Exp $ */ #include @@ -988,6 +988,15 @@ main(int argc, char *argv[]) { type = token.value.as_ulong; isc_buffer_init(&tbuf, outbuf, sizeof(outbuf)); result = dns_rdatatype_totext(type, &tbuf); + if (result != ISC_R_SUCCESS) { + fprintf(stdout, + "dns_rdatatype_totext " + "returned %s(%d)\n", + dns_result_totext(result), result); + fflush(stdout); + need_eol = 1; + continue; + } fprintf(stdout, "type = %.*s(%d)\n", (int)tbuf.used, (char*)tbuf.base, type); } else if (token.type == isc_tokentype_string) { @@ -1020,6 +1029,14 @@ main(int argc, char *argv[]) { class = token.value.as_ulong; isc_buffer_init(&tbuf, outbuf, sizeof(outbuf)); result = dns_rdatatype_totext(class, &tbuf); + if (result != ISC_R_SUCCESS) { + fprintf(stdout, "dns_rdatatype_totext " + "returned %s(%d)\n", + dns_result_totext(result), result); + fflush(stdout); + need_eol = 1; + continue; + } fprintf(stdout, "class = %.*s(%d)\n", (int)tbuf.used, (char*)tbuf.base, class); } else if (token.type == isc_tokentype_string) {