mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 19:02:05 -04:00
dns_name_totext() now always prints the root name as '.',
even when omit_final_dot is true
This commit is contained in:
parent
8edbb66acd
commit
a3c0a79b61
3 changed files with 6 additions and 8 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
226. [func] dns_name_totext() now always prints the root name as '.',
|
||||
even when omit_final_dot is true.
|
||||
|
||||
225. [cleanup] The enumerated dns_rdatatype_* identifiers are now
|
||||
cast to dns_rdatatype_t via macros of their same name
|
||||
so that they are of the proper integral type wherever
|
||||
|
|
|
|||
|
|
@ -845,9 +845,8 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
/*
|
||||
* Convert 'name' into text format, storing the result in 'target'.
|
||||
*
|
||||
* Notes:
|
||||
* If 'omit_final_dot' is true, then the final '.' in an absolute
|
||||
* name will not be emitted.
|
||||
* If 'omit_final_dot' is true, then the final '.' in absolute
|
||||
* names other than the root name will be omitted.
|
||||
*
|
||||
* Requires:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -3056,18 +3056,14 @@ void
|
|||
dns_name_format(dns_name_t *name, char *cp, unsigned int size) {
|
||||
isc_result_t result;
|
||||
isc_buffer_t buf;
|
||||
isc_boolean_t omit_final_dot = ISC_TRUE;
|
||||
|
||||
REQUIRE(size > 0);
|
||||
|
||||
if (dns_name_equal(name, dns_rootname))
|
||||
omit_final_dot = ISC_FALSE;
|
||||
|
||||
/*
|
||||
* Leave room for null termination after buffer.
|
||||
*/
|
||||
isc_buffer_init(&buf, cp, size - 1);
|
||||
result = dns_name_totext(name, omit_final_dot, &buf);
|
||||
result = dns_name_totext(name, ISC_TRUE, &buf);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
/*
|
||||
* Null terminate.
|
||||
|
|
|
|||
Loading…
Reference in a new issue